Shortcodes not showing up in WPtouch Pro
Enabling Desktop Theme Shortcodes
When using shortcodes that are exclusive to the desktop theme, they may show up as 'raw' text in WPtouch Pro. WPtouch Pro loads its own theme(s) that is independent of the desktop theme. Therefore, it cannot "see" the shortcodes that are custom to the desktop theme.
Support for the shortcodes can be added using the new Shortcode handling feature in Settings > Site Compatibility > Shortcodes. Once Shortcode handling is enabled, select the "Process desktop theme shortcodes" option and save the changes.
WPtouch Pro will attempt to load the desktop theme's content and shortcodes in WPtouch Pro.
Troubleshooting
Refresh Page Content
If after enabling you are still not seeing your shortcodes display, open a page/post with shortcodes in it and click the "Update" button. Then, reload the page/post in WPtouch Pro and see if that helps resolve the issue.
Shortcode CSS and JavaScript
Sometimes the shortcodes will require CSS and/or JavaScript code to be copied from the desktop theme.
To load the desktop theme's shortcode CSS, locate the shortcode styling in the style.css file (or similar) in the desktop theme's directory. The CSS, can be added using one of the methods described in the Adding Custom Styling to your mobile theme article.
JavaScript for the desktop theme's shortcodes can be added via the Appearance > Customize > Footer > Custom Footer Content area. Contact the desktop theme's author for the JavaScript required for the desktop theme's shortcodes.
Compatibility with Wordfence
Sometimes, content for your posts or pages will not show up in your mobile theme when "Process desktop theme shortcodes" is enabled.
This can be caused by security plugins, such as Wordfence, that may be blocking WPtouch Pro's functionality for fetching your content.
Set Firewall to "Learning" Mode
Wordfence's firewall may be mistaking WPtouch's requests to render your desktop shortcodes as a threat. To correct this, set the firewall to "Learning Mode" in Wordfence > Firewall.
With learning mode enabled, Wordfence will allow WPtouch's requests to go through and learn that they are safe. In most cases, this is all that you should need to do. If your content still does not display, you may need to try the options below.
Whitelisting Requests
When you view a page in your mobile theme and see no content, open your WordPress admin and go to Wordfence > Live Traffic.
You should see some requests showing up as blocked, they will be in red. Simply click on the "Whitelist param from firewall" button to stop Wordfence from blocking that page.
This will have to be done once for each page that is being blocked.
Disabling XSS Firewall
You can also disable Wordfence's XSS firewall to prevent it from blocking any of WPtouch's requests for content. This should only be done if you are comfortable running your website without the XSS firewall.
To disable the XSS firewall, follow these steps:
Go to Wordfence > Firewall
-
Uncheck the "xss" option in the list of rules.
The firewall should automatically save, and now all pages should be unblocked.