Home › Forums › Gillion Theme › Shortcode instead of ad shows on certain pages
Home › Forums › Gillion Theme › Shortcode instead of ad shows on certain pages
Hi! I have placed in some banner ad shortcode (I am using the “AdSanity” banner ad plugin for our ad management) in the header ad section on our Gillion theme under theme settings. On some of our vendor directory pages, the shortcode shows instead of the ad. I asked the directory plugin developer why this would happen and they said I should ask our theme developer because this shortcode is within the theme template and outside of the directory plugin code. Can you help? To see where it is happening, please see the link below in the private information field. Thanks!
I hope you are well today and thank you for your question.
Do you face the same issue for any other shortcode such as gallery shortcode as shown in the attached screenshot?
Best regards,
Shufflehound team
Yes, I do face the same issue. I placed [gallery] in on that box and saved and on some of our site pages, nothing showed (we don’t have a gallery set up under the gallery section in the backend) and then on our directory pages, where we are having the problem with the shortcode showing (like the private link I sent originally above) it showed the text “[gallery]” in that space.
This happened with another banner ad plugin we were using. It was the reason we changed to a whole new banner ad plugin but it is not resolving the issue so I think it is a theme header issue. Can you help?
Would you mind if I log in to your site and do quick troubleshooting? If this is ok then could you please temporarily create an admin user account and share me the account login details privately by adding them in the box having text “Enter your private content here (only you and forum moderators will be able to see it)”?
Sure. I could create that admin login. Just to ask first, can I place in php code like:
?php
adsanity_show_ad( array(
// any valid ad ID will do
// (you can get this from the main list of ads)
‘post_id’ => 1,
// (one of the following:
// alignleft, aligncenter, alignright or alignnone)
‘align’ => false,
// this will optionally return the output instead of echoing it
‘return’ => false,
));
?>
in that header AD spot? I tried and it just showed that text in the ad spot. I am trying to figure out a way (if I don’t use shortcode for the banner ad) for the ad to show on all pages. We’re using AdSanity banner ad plugin and they do have a php code option for showing the ad instead of shortcode if this is possible in the Gillion header ad spot. (https://adsanityplugin.com/help/guide/placing-ads-on-pages/template-tags/)
The shared CSS code uses the function adsanity_show_ad which is a custom function so I can’t comment anything on it.
Since we’re having such issues with our banner ad shortcode or template code working in the header ad spot on the Gillion template, I think we are going to have to hard code the template php ad code into the header. Since we’ll have to alter the header file can you help me with two things:
Thanks!
I guess, just to follow up on my comment above, is there any way to get a child theme zipped and sent to me that I can upload to my site and activate that won’t mess up our site that includes the right files to have it in that I can then add the altered header-3.php file to?
Solution for this topic
Yes, you have to overwrite the header-3.php template file that I have added in the attached Gillion child theme.
Thank you so much. I appreciate your help.
You are most welcome here 🙂