Remove ads from custom post type

Posted in: Newspaper
Post count: 623

Need help to remove/disable all the ads from the CPT.

I don’t want CSS solution. https://forum.tagdiv.com/topic/remove-ads-from-custom-post-type/

As ads and content both come from the <?php echo $td_mod_single->get_content();?>,
Is it possible to remove ad hooks which getting triggered from td_module_single_base.php by creating a new template for CPT?

Post count: 22421

Hi,
I’m sure you can wrap the code around a few conditions like: https://wordpress.stackexchange.com/questions/6731/if-is-custom-post-type
https://www.screencast.com/t/DxhS7dD2Cf
I don’t think there is a need to create a new template just to remove ads.
Thanks.

Post count: 623

Thanks @bogdan-b

I have successfully removed ads for CPT.
Now the problem I am facing is unable to get archive page for CPT
Suppose CPT for “book” with taxonomy “Genre”.
I am able to see archive page for domain.com/genre/genre1 but unable to see archive for book at domain.com/book/ it shows 404 error
I want all books can be seen at domain.com/book/ or domain.com/books/

Post count: 22421

Hi,

Maybe this guide will help create the archive you are looking for:
http://www.wpbeginner.com/wp-tutorials/how-to-create-a-custom-post-types-archive-page-in-wordpress/

Thanks

Post count: 623

Thanks @bogdan-b

I have fixed it by modifying the CPT code.

Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.