Remove shortcode for specific page/post

Posted in: Newspaper
Post count: 60

Hi.

I have a shortcode in Ads/Header ad. Is the a way to not display this for a specific page – like.

if “page” <> xx then use shortcode

Post count: 22421

Hello,

Sorry but our theme does not have advanced controls over the ads regarding what pages these ads will show up on. Ads are placed across the whole site at once in our theme. You will have to use plugins to be able to display ads separately for each pages.

Thanks.

Post count: 60

Hi. I’m not using the section for an ad. I’m just using it for a picture I want in the header. That was the easiest way if i wasn’t going to edit the template.

If have tried to paste this code into the header section but nothing happens. Shouldn’t this work ?

<?php
if ( in_category(‘my-category’))
{
echo “Hello world!”;
} else {
echo “Hello world2!”;
}
?>

Post count: 20688

Hi,

You could create that condition in the header template file
https://www.screencast.com/t/bkaSFKrIO
So for example – https://www.screencast.com/t/3tWciB8diENM

I believe the Adrotate plugin has options like that, you could consider using that
http://www.wpbeginner.com/plugins/how-to-manage-ads-in-wordpress-with-adrotate-plugin/
https://ajdg.solutions/manuals/adrotate-manuals/

Thanks

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