WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Sidebar Menu
[resolved] Add class to second level link (6 posts)

  1. Jakob Smith
    Member
    Posted 8 months ago #

    Is there a way, through a filter maybe, to add a class to second level links?

    I'm trying to specifically style the current page ancestor of a current page item on third level, but if I add styling to

    .advanced-sidebar-menu .current_page_ancestor a

    it also affects the links inside

    <ul class="grandchild-sidebar-menu level-3 children">

    I was thinking of something like adding the page-slug as a class in <a>, because I need individual colors for the menu under each parent page.

    Is there a list of available filters?

    http://wordpress.org/plugins/advanced-sidebar-menu/

  2. Mat Lipe
    Member
    Plugin Author

    Posted 8 months ago #

    HI Jakob,

    What if you try something like this?

    .advanced-sidebar-menu .current_page_ancestor > a

    Does that do what you are looking for?

  3. Jakob Smith
    Member
    Posted 8 months ago #

    Yes! Thanks!

    And thank you for pushing me to learn about the ">"-selector.

    Found an explanation here:
    http://stackoverflow.com/a/4459872

    (Do you have a list of available filters? :-) )

  4. Mat Lipe
    Member
    Plugin Author

    Posted 8 months ago #

    Great! I'm glad it worked.

    Sadly no, my developer documentation is lacking for this plugin. It is on my list but I have not had a chance.

    Have a great one!

  5. Mat Lipe
    Member
    Plugin Author

    Posted 8 months ago #

    Hi Jakob,

    I have start on my developer docs. There is still a long way to go to finish them but it's something

    http://matlipe.com/advanced-sidebar-menu/developer-docs/

  6. Jakob Smith
    Member
    Posted 8 months ago #

    Hi Mat,

    Thanks, that's great!

Reply

You must log in to post.

About this Plugin

About this Topic