• Josh

    (@joshmbuck)


    Hello,

    I am working on updating my blog, and I noticed that when I have only one category selected, no categories show up across the whole blog, but when I have more than one selected they appear again. (for clarity…if any one post only has one category, then the line disappears from all posts.)

    Any thoughts?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @joshmbuck,

    I’ll be happy to take a look — can you send a link to the site you are working on?

    when I have only one category selected

    When you say “selected”, do you mean you click on a category link and are viewing all posts in that particular category? Where are you expecting the other categories to be listed?

    Just let me know and we can go from there.

    Thread Starter Josh

    (@joshmbuck)

    thanks for the response…sorry for the delay.

    No, I mean I created a post, and ticked only one category on the edit post page. When I go to view the post on my home page, no categories show up. If I go back and edit it to have more than one category, all is good.

    The site is http://www.skewedviews.com/svblog.

    Thread Starter Josh

    (@joshmbuck)

    OK, so I did a little more work. it seems that the categories disappear on a post when there is only one visible post. I had several that were private. I created a new post and made it public…then the categories showed up. This seems like something in Libretto, and not in my child theme?

    Gemma Evans

    (@gemmaevans)

    Hi @joshmbuck,

    When I go to view the post on my home page, no categories show up.

    I just want to make sure I’ve understood correctly:

    • If you assign to category to a post, it doesn’t show on the home page and the entire category line is not displayed.
    • If you edit the post and add a second category, it does show up.
    • The category only shows when the post is public.

    Are any of those details incorrect? Also, I’ve checked the Libretto demo site and displaying post meta on the homepage doesn’t appear to be default theme behaviour (categories only appear on single posts). Did you make changes to this area in your child theme?

    Thread Starter Josh

    (@joshmbuck)

    @gemmaevans,

    You’re right…I forgot that I had monkeyed around with the meta data in my child theme. I really don’t know anything about css and php. I just try different things until I get it to do what I want, so my apologies to Libretto…it was probably my fault 🙂

    Just for clarity (hopefully): if I have one public post and that post has only one category assigned, the whole category row won’t show (this happens even if I have a ton of private posts). If that public post has more than one category assigned, then the category line does show.

    If I have more than one public post, it doesn’t matter how many categories are assigned to each individual post; they all show their categories.

    Hopefully that makes a bit more sense.

    Truthfully, this won’t matter in the long run as I will have more than one public post…but I’d like for my coding to be correct.

    Thanks again.

    Josh

    • This reply was modified 5 years ago by Josh.
    Gemma Evans

    (@gemmaevans)

    Hi Josh,

    No problem, that thought only came to mind when I checked the demo site and noticed a difference in behaviour 🙂

    It sounds like this behaviour is being caused by an issue in your child theme’s code. I’m afraid I’m unable to help with custom code but someone else may be able to offer some suggestions. I’ve found a couple of links that may be useful though:

    1. the_category function
    2. Displaying post meta data in WordPress themes

    I hope these help but if not, you may want to contact a developer so they can take a closer look at the code.

    Thread Starter Josh

    (@joshmbuck)

    thanks…i appreciate it.

    Gemma Evans

    (@gemmaevans)

    You’re very welcome, best of luck!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Categories not showing if only one category is selected’ is closed to new replies.