1

I have a post category on my site which does not require a "single" view. I do not want these posts to be indexed or accessible directly because all of the relevant information for these specific posts will be on the list view for this category.

I found this answer which suggests adding 'publicly_queryable' => false, but that seems to be intended for custom post types. I don't have any links on the category page that would allow the user to click through to the single view of these posts, but I also don't want anyone to be able to access them directly. Maybe that's as simple as excluding them from being indexed by search engine bots?

What would the best course of action be for this?

1

You can disallow a category to be listed by search engines using an SEO plugin such as Rank Math. http://rankmath.com/ De-indexing a category can be easily done.

However for not letting your users click on the posts that can be a little more tricky if they are already on the category page.

One possibility is to use the CSS pointer-events. For example this would be your CSS:

.category-banana .post-content li a {
pointer-events: none;
}

Evidently we don't have a link to your category in question therefore we cannot give the accurate CSS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.