Shortcode not working in mobile theme

Posted in: Newspaper
Post count: 24

Hi,

I have been trying to insert my custom shortcode into mobile theme but it is not working. Desktop version looks good, but amp version shows the shortcode, not the text it is supposed to return. Can you advise this basic functionality is available for this theme or not? Or any workarounds please?

Thanks,

Post count: 35449

Hi anonwebsitebuilder,

Using the mobile theme plugin, you’ll gain a better speed then responsive version of theme, but in order to achieve that speed you’ll need to create a new content for pages because in the most of cases those were made with builders or shortcodes ( tagDiv Composer, WPBakery ) and you need to use only the mobile editor ( you need to set the content for pages in mobile editor and this content will be display on mobile theme)
-> https://i.imgur.com/9d0UWLT.png
Unfortunately if you are using same plugin for shortcodes, this will not work on mobile theme, it will be interpreted as a html text, this will work only on responsive version. Also because amp plugin is use with mobile theme plugin the shortcode will not work on amp too, only if you do not use the mobile theme for amp.

Also you can show the responsive version on mobile theme -> https://i.imgur.com/m0bVB5T.png you can check more details about mobile theme in our documentation -> https://forum.tagdiv.com/the-mobile-theme/ or if you want to have the responsive version only, you can use the amp option from mobile theme -> https://i.imgur.com/oofST3D.png (to use the mobile theme template on amp) or you can disable the plugin.

Thank you for your understanding!

Post count: 24

Hi thanks for your reply. Could you advise how to set responsive version on mobile theme for Posts (Not page) and also how to use mobile editors for Posts only?

I need to implement this for my new posts, and I am writing my own shortcodes in function.php.

thanks,

Post count: 35449

Hi,

The mobile theme can be enable/disable on posts/pages using the option from Gutenberg editor -> https://i.imgur.com/FG8ZtS3.png also the mobile theme editor can be use only on pages, only these need to be rebuild using mobile theme plugin.
Also if you shortcode need to be set in functions, it can be a change to work with mobile theme too, just set the code in functions.php from mobile theme -> wp-content/plugins/td-composer/mobile/functions.php

Thank you!

Post count: 24

Thank you, appreciate your help. Updating mobile theme function.php solves my issue!

Post count: 24

Hi this is urgent. Updated my theme to latest version. The above method of updating mobile theme function file no longer and stopped working. Please advise!!

Post count: 24

Issue resolved. Updating the main theme function.php instead of the mobile theme is working now for me instead. Wierd.

Post count: 35449

I’m glad that the problem was solved!
If you have other questions related to our theme, just let us know!
Have a nice day!

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.