• I am hoping someone out there can help me fix an issue I am having with the categories in wordpress. When you visit one of the blog posts on the site, all categories ever used show up in the side bar instead of just the categories assigned to the post. Does anyone know how to change it from showing all categories to just showing the categories assigned to that specific post?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Can you please share the link to your website so that I can have a look and suggest you a solution.

    regards,
    Shreyans

    Thread Starter hylmnstyle

    (@hylmnstyle)

    sure just click here. Using a google short link but it does take you to the blog page with the category issue.

    Thanks for taking the time to look at the issue for me.

    What you’re seeing is a navigation menu, not a category list for your posts. Those are two very different things.

    If you want to change this you’ll need to figure out which sidebar is hodling that meu, and modify it to show only the categories for the current post. I haven’t seen a default widget to do that yet, but I’m sure that there’s something out there that could do that – or you can make one of your own.

    If it was me, i’d leave it the way that it is, and if the categories are really needed, add them between the psots title and content. That way people will see the cateogries for that post as well as the other categories that are available so they can explore more of your site.

    Thread Starter hylmnstyle

    (@hylmnstyle)

    Really? I am using the wordpress category widget. So that is providing a menu not a category?

    I like your suggestion, do you have any tips on how to add them in that way?

    Yes, the categories widget displays the cateogries as a menu, not for the categories of the current page/post.

    As for how to add it, you’d need to add something like this into your template file:

    <p>Posted in <?php the_category(); ?></p>

    https://codex.www.ads-software.com/Function_Reference/the_category

    Thread Starter hylmnstyle

    (@hylmnstyle)

    I am so glad I posted something before I pulled the last of my hair out on this.. As you can tell, I am pretty new to the wordpress scene so I am learning everything in what seems to be “the hard way”! LOL

    Let me give this category a whirl and see if I can get it to call above working!

    Hi @hylmnstyle,

    You misunderstood what category widget does and I guess @catacaustic did clarify that.

    You can show the category name of the post right after the post title as most of the blogs have.

    See if you can get the solution provided by @catacaustic.
    Since you say that you are new to wordpress, you might find it difficult. In that case you can find the “single.php” file in your wordpress theme directory and paste the code here. I can then suggest you the modifications in the code.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Determining what categories are visible in a WordPress post’ is closed to new replies.