How to remove 410 posts from search results and category pages ?

Posted in: Newsmag
Post count: 161

Hello,

I have recently turned about 400 posts from 200 status to 410, with Yoast plugin. This method is quick, but doesn’t send the posts in the trash bin. Therefore the posts with 410 status still appear in the search results and the category pages.

Is there a code to add (and where) in order to prevent posts with a 410 status to be displayed in the search page results as well as on the category pages ?

Thanks in advanced.

Post count: 23312

Hi,

Please check the following useful Seo Yoast guide from here -> https://yoast.com/deleting-pages-from-your-site/ Also, if you do not want them to be displayed, you must permanently delete them.

Thanks for your understanding!

Post count: 161

Thanks Catalin, I understand that I need to manually delete all the 410 post. However I was wondering if there was a code to insert in category.php so that the thumbnail of the 410 post are not displayed ?

Post count: 23312

Hi,

Unfortunately, the theme does not have any such an option for this, sorry!

Thanks for your understanding!

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