Shortcode on mobile

Posted in: Newspaper
Post count: 8

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?
Desktop
Mobile

Post count: 23312

Hello creativeteamcanada,

Unfortunately, I do not exactly understand what kind of shortcodes you are using. Provide some useful screenshots so I can identify it and also, so I will be able to provide am roe accurate response.

Thanks.

Post count: 8

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





Thanks,
Andrea

Post count: 8

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.

Post count: 20688

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

Post count: 8

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

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