Exclude Ad only for certain category

Community Forums Forums Design Tips and Tricks Exclude Ad only for certain category

This topic is: not resolved

Tagged: , , ,

This topic contains 1 reply, has 2 voices, and was last updated by  braddalton 1 year, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #47759

    kita817
    Participant
    Post count: 2

    Hello, I am using simple hooks to show ads before the comment on a site but due to ad contract and sponsored posts, have to exclude this ad from showing only in a specified category.
    Is there a code to show an ad in all categories but one that I can pop into simple hooks?

    #47845

    braddalton
    Participant
    Post count: 10240

    Please link to your site.

    Add the conditional tag to the code to exclude content from being displayed on posts in the entire category
    [php]
    if (in_category (‘category-slug’) ) }
    [/php]

    Learn more http://designsbynickthegeek.com/tutorials/conditional-page-content


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.