WordPress.org

Forums

[resolved] Highlight category when on single post (6 posts)

  1. neehcs
    Member
    Posted 1 year ago #

    Hi,

    I've made a menu with the different categories which is shown in the "Primary Navigation", but the category is not highlighted when a single post is clicked within that category. I've looked around on this forum and mainly found older posts for this topic, so I was wondering if there's an "easy" way maybe to get this done (preferably without coding)? Maybe some smart plugin that does the trick?

  2. neehcs
    Member
    Posted 1 year ago #

    just in case, my website can be found here.

  3. Michael
    Forum Moderator
    Posted 1 year ago #

    try:

    #access ul li.current-post-ancestor > a { color: #e6ac27; }

  4. neehcs
    Member
    Posted 1 year ago #

    Hi,

    I should add this to the styles.css file right? Just tried that, didn't work unfortunately.

  5. Michael
    Forum Moderator
    Posted 1 year ago #

    right now, I can't find the suggested added CSS in style.css - (?)

    ideally, do not edit theme files directly, but work either with a child theme or use a custom CSS plugin.

    or use the custom CSS option of your theme - please ask in your theme's forum if you need help with that. https://wordpress.org/support/theme/parabola/

    and don't forget to clear the browser cache after any changes to the styles, to get to see the result immediately.

  6. neehcs
    Member
    Posted 1 year ago #

    Hi,

    I used the custom CSS option of the theme and it worked!

    Thank you so much for helping out, as you might have figured I'm pretty new to WordPress and therefore the elaborated guidance you gave me is much appreciated!

Topic Closed

This topic has been closed to new replies.

About this Topic