Archived topic
Post would not show its own category
9 replies · Started by Philippe on February 28, 2022
Hi,
Something is happening that I can make absolutely no sense of. I created a new post and, at first, it showed at the bottom the category for a post series created earlier on, even though I made sure to label this post under the "Uncategorized" category. So, I created a specific category for this specific post. Same thing; the category it is unrelated to still appears at the bottom of the page.
Do you know what might be happening? Additionally, can you remind me where to find the functionality to show or hide the mention of categories at the bottom of posts?
Thank you!
Hi Philippe,
Can you link us to the post where we can see the issue?
Additionally, can you remind me where to find the functionality to show or hide the mention of categories at the bottom of posts?
You can turn it on/off at customizer > layout > blog .
Thanks for your answer.
Weeks ago, I unchecked the functionality to display posts categories.
I use the code below to make sure that Post-nav links on the single-page posts only lead to next/previous posts, supposedly within the same category.
add_action( 'after_setup_theme', 'tu_category_specific_post_navigation' );
function tu_category_specific_post_navigation() {
add_filter( 'generate_category_post_navigation', '__return_true' );
}
However, it seems that this code does not take categories into account since all posts link to one another in an orderly chain and continue to do so at the last post of a series (series with its own category) by linking to the first post of the next series/category. You can see what I mean by looking at the following post: [https://onehomeplanet.com/democracy-incorporated-by-sheldon-wolin] This post is the first of a series under the category "Democracy Incorporated." The link "Be Agnostic about Growth" at the bottom of the page points to the last post of the previous series/category, labeled "Doughnut Economics;" the link "Myth in the Making" points to the following post in the same series/category ("Democracy Incorporated").
I am realizing just now that it is not really an issue if the code above ignores categories. Actually, it is a bonus since this might trigger visitors to enter another reading series. As for the post for which this is indeed an issue (https://onehomeplanet.com/feedback), is there a method to force Wordpress to ignore its publishing date? If not, I will delete it.
Life goes on :)
Hi there
is there a method to force WordPress to ignore its publishing date?
Can you explain what you want here?
Hi David,
I meant the publishing date of a particular post.
Why not replace that post with a Page ? Then it will be excluded from posts altogether and not show in either archive or the post navigation.
Sure. I just wanted to have the benefit of comments with WPdiscuz, which does not allow comments on pages.
I'll find a workaround for what I want.
Thanks again.
The WPDiscuz docs has a Post Type option including Pages and the option to set them on specific IDs:
!!! I did not see it.
Glad to be of help