WordPress.org

Ready to get started?Download WordPress

Forums

styling root pages diferently (3 posts)

  1. Maujor
    Member
    Posted 7 years ago #

    I'm using some root pages (pages with sub-pages) and single pages in my Blog.
    Question is:
    How to assign a customized class for the LI element that markup a page.
    For example:
    The defaul is class="page_item" for all pages.
    I want to target the root pages only and assign class="root_page" or class="page_item root_page" in order to create a hook for stylize they.
    Thanks

  2. Chris_K
    Member
    Posted 7 years ago #

    Why not just use different Page templates for "root" pages?

    See Pages for more on templates.

  3. Maujor
    Member
    Posted 7 years ago #

    Hi HandySolo,
    It appear that I wasn't clear in my question.
    I want stylize the navigation menu for the pages (on the sidebar) in a different manner for the root pages, not the pages itself.
    Say: links for single pages will be red text and for root pages blue text.
    Give only a way to assign a class for LI that encloses the link for root pages and I will stylize.

Topic Closed

This topic has been closed to new replies.

About this Topic