WPtouch Mobile & WPtouch Pro Custom Page Template Tutorial

Home Forums BulletProof Security Pro WPtouch Mobile & WPtouch Pro Custom Page Template Tutorial

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #21384
    AITpro Admin

    How to add a Custom Page Template that you created in your Theme to WPtouch Mobile or WPtouch Pro to display that Custom Page Template in a Mobile Template/Mobile version to Mobile device website visitors.

    WPtouch Mobile (free version):

    Notes: This file: /wptouch/themes/foundation/default/home-template.php is the starting point. It is a WPtouch Mobile Template file that you will use to create a mobile version of your existing WordPress Theme Custom Page Template from. In other words, you are going to use the home-template.php file as your new mobile version of your existing WordPress Theme Custom Page Template and copy whatever code, text or other things that exist in your Custom Page Template to the home-template.php file. The reason you want to use this file and not just copy your Custom Page Template to the folder where it is supposed to go is that the home-template.php file contains WPtouch specific code that needs to be in your new mobile template file or else it will not load correctly or display correctly. A Theme Custom Page Template file will be located in your Theme’s folder: /wp-content/themes/your-theme-name/your-custom-page-template-file.php

    1. Copy this file: /wptouch/themes/foundation/default/home-template.php to your Mobile Theme folder here: /wptouch/themes/bauhaus/default/
    2. Rename the home-template.php file to the EXACT same name as your existing Theme’s Custom Page Template file name. For this tutorial I am using example.php for the Custom Page Template file name.
    3. Open the /wp-content/plugins/wptouch/themes/bauhaus/default/example.php file and open your existing Theme’s Custom Page Template file with a code editor (Dreamweaver, Notepad++, etc).
    4. At the top of the example.php file (was home-template.php before I renamed it in step 2) file add your Custom Page Template’s name: Mobile Template: Home Template. Example: Mobile Template: My Custom Page Template Name Here.
    5. Directly AFTER this line of code below in the example.php file you can start copying any text, code or whatever else you want from your Theme’s Custom Page Template. Remember you are creating a mobile version of your Custom Page Template and not an exact copy of it.:

    <?php wptouch_the_content(); ?>

    6. I recommend that you do a test preview here using the code below just to see your progress so far. Add this code in your example.php file directly AFTER this line of code:

    <?php wptouch_the_content(); ?>
    <div id="mobile-top" style="text-align:center;padding:10px;">
    <p>Testing new Mobile Device Template. Text align center and padding 10px</p>

    7. You can use your own mobile device to see/check/test your progress. If you do not have a mobile device and you are comfortable with using Google Chrome Developer Tools it has a built in Mobile Device testing/viewing tool that allows you to view your site as if you are viewing it from a mobile device. Or you can go to the WordPress Appearance panel >>> Menus page and add your Custom Page Template page to your Menus so that you can preview the Mobile Template page using the WPtouch Preview Theme button. Note: this will add a top level menu item to your website navigation menus while you are testing and creating your new Mobile Template.
    8. Once you are done adding all your text, code etc. to your new Mobile Template file you are done. No other steps are required.

    WPtouch Pro (premium/paid version):
    All of the steps for the WPtouch Pro version are the same as the free version except for step 1. You will be copying this file: /wptouch/themes/foundation/default/home-template.php to your Mobile Theme folder here: /wp-content/wptouch-data/themes/bauhaus/default/.


    • If you are using a different WPtouch Mobile Theme then copy the home-template.php file into the theme folder that you are using.
    • If you have the BPS Pro plugin installed you will need to create an AutoRestore Folder Exclude rule for the wptouch-data folder. See this video tutorial for how to add/create AutoRestore Folder Exclude rules or do the steps below:  http://forum.ait-pro.com/video-tutorials/#autorestore-quarantine

    1. Go to AutoRestore and turn Off the ARQ Cron.
    2. Click on the Exclude wp-content Folders tab page.
    3. Enter this Label|Description: Exclude wptouch-data Folder. Enter this folder name: wptouch-data.
    4. Click buttons 1, 2 and 3 in order.
    5. Turn the ARQ Cron back On.


    Hi BPS,
    I upload WPTouch Pro, however I encounter the problem as below. I read and tried few times with the guide as above, however I am confuse now. Once when I uploaded, and click activate then it pop up the message below;-

    Warning: require_once(/home4/alexwong/public_html/wp-content/plugins/wptouch-pro/pro/professional.php): failed to open stream: No such file or directory in /home4/alexwong/public_html/wp-content/plugins/wp-touch-pro_4.0.10/core/globals.php on line 4
    Fatal error: require_once(): Failed opening required '/home4/alexwong/public_html/wp-content/plugins/wptouch-pro/pro/professional.php' (include_path='.:/opt/php54/lib/php') in /home4/alexwong/public_html/wp-content/plugins/wp-touch-pro_4.0.10/core/globals.php on line 4

    Please guide,
    Alex Wong

    AITpro Admin

    Since this is a WPtouch plugin issue/problem that is not related to the BPS plugin in any way then you should contact the WPtouch support folks for help with that.


    Could it be there’s some directory or file that i need to change? Could you guide me and give me some tips so that I can try it myself. Thanks.

    AITpro Admin

    I’m not really a WPtouch plugin expert so you would probably get a quicker answer from the WPtouch plugin support folks. 😉

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.