Sorry for the late reply.
I tried using the code you provided to prevent ads from showing in posts from one particular category.
But unfortunately it still doesn’t seem to work!!
Is it possible for you to reply on this?
Can you please link to the category archive on your site where you say it doesn’t work?
All the code i write and provide on these forums is tested.
You can easily change the conditional tags to suit your needs.
Always happy to help!!
Thanks a lot for the quick reply…
I think there is some confusion on my side.
I am trying to restrict ads from showing in all the posts belonging to a particular category and not in the archive page.
Is the code provided just for the same..?
Sorry if I had been not clear in the first place.
Understand. Please link to the category archive. Thanks
I am sorry if this sounds stupid, but how to link to the content archive. I think I am missing something here!
Thanks in advance.
All the articles of this category:
I tested this code and it works.
Make sure you add the correct category i.d.
Copy from the view raw link and use a code editor like Notepad++.
Code not displaying? Grab it on Github
I suggest you install WordPress locally and test/modify PHP code if you plan on using custom functions.
Thanks a lot Brad!
Will give it a try again and get back to you.
You must be logged in to reply to this topic.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.