Support » Themes and Templates » How to add icon "new" to the specific subcategory in sidebar?

  • Hi all,

    How to add icon “new” to the specific page link in sidebar?

    My theme calls WordPress built-in function dynamic_sidebar() to display sidebar which consist of page links and I would like to mark the new pages with the small “new!” stamp.

    I know how to add icon to *all* page links in sidebar with the following CSS code:

    #subcontent ul.pages li, #subcontent ul li, #subcontent ul li.page_item {
      padding-right:10px;
      background: url(../images/spring_flavour/new.gif) top right no-repeat;
    }

    But what is the way to add such icon to the *specific* page only? Without hacking into WordPress dynamic_sidebar() code.

    Many thanks,
    Dmitriy

Viewing 4 replies - 1 through 4 (of 4 total)
  • Chip Bennett

    (@chipbennett)

    Theme Review Admin

    Is your menu being generated via wp_list_pages(), or via wp_nav_menu()?

    Chip Bennett

    (@chipbennett)

    Theme Review Admin

    p.s. hacking into dynamic_sidebar() isn’t going to help you in any way whatsoever.

    Menu is being generated manually. There is a cycle using get_pages() and printing HTML link to the each page using echo and get_page_link().

    So, does anyone know what would be the best approach to add icon with logo “new!” to the specific page link in sidebar?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add icon "new" to the specific subcategory in sidebar?’ is closed to new replies.