Support » Developing with WordPress » styling root pages diferently

  • 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Why not just use different Page templates for “root” pages?

    See Pages for more on templates.

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘styling root pages diferently’ is closed to new replies.