I’m trying to use a shortcode that was declared on my functions.php but it only works on desktop version.
The shortcode shows an ad on the header.
Can someone tell me how can I do it correctly?


Hi Catalin,
I created one simple shortcode with just an echo on my functions.php file, you can check the prints bellow:





Thanks,
Andrea
I found the problem, when I disable the “tagDiv Mobile Theme” plugin everything works fine, but I will not have all specific configurations for the mobile version, without this plugin.
Hi,
The mobile theme will most likely not render that shortcode, it is not meant to. It will not interpret page builder shortcodes as well.
If you want to use the mobile theme and also display a header ad, you will have to use a different implementation for the ad on mobile devices, instead of the shortcode. You could simply paste a HTML link with image in the ad section
– https://forum.tagdiv.com/using-other-ads-non-adsense-ads/
Thanks
Hi Simion,
Yeah this will not work for me, I’m using shortcode as a way to check the current category and use different banners for each category of the website.
Well I’ll disable the plugin, there’s no reason to use it, even the footer can’t be changed by php code if I’m using this plugin.
Thanks,
Andrea