WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Applyin style to Category list (5 posts)

  1. MaddTechWF
    Member
    Posted 4 years ago #

    I have a category list that shows up like a menu. Is there default CSS code that will allow me to change its color when selected?

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    A link to your site would help.

  3. MaddTechWF
    Member
    Posted 4 years ago #

    I don't have the theme up. I'm currently working on it. I'm using the <?php wp_list_categories('arguments'); ?> and want to apply a selected theme to the current item selected. I just wasn't sure what code snippet to put in my CSS that would tell it to change the font color of the selected item.

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    For Pages, you can use .current_page_item,.current_page_parent,.current_page_ancestor

    For Categories, there's just .current-cat

  5. MaddTechWF
    Member
    Posted 4 years ago #

    I just found my answer here...

    li.categories { ... }  /* outermost list item */
     li.cat-item { ... }
     li.cat-item-7 { ... }  /* category ID #7, etc */
     li.current-cat { ... }
     li.current-cat-parent { ... }
     ul.children { ... }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.