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 9 months, 3 weeks 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: 7454

    Please link to your site.

    Add the conditional tag to the code to exclude content from being displayed on posts in the entire category

    if (in_category ('category-slug') ) }
    

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


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

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

You must be logged in to reply to this topic.