Support » Themes and Templates » styling the wp_get_archives() menu

  • I am trying to style my menu created by wp_get_archives() like I did my menu created with wp_list_categories().

    Somehow the wp_list_categories() created menu gives me classes on each
    <li> like this: cat-item cat-item-25 current-cat, so I can style my current-cate link. But the menu created by wp_get_archives() does not do that. Am I missing something?

    Any help would be greatly appreciated with this!!!

Viewing 1 replies (of 1 total)
  • Michael


    Forum Moderator

    a possible way to add a few css selectors to an archive list:

    <ul class="archive-list">
    <?php wp_get_archives('format=custom&before=<li class="archive-item">&after=</li>'); ?>

    you could either use the class in the ul tag, or the parameters in the code, or both.
    (the ‘wp_get_archives()’ cannot output any numbered or current css classes).

Viewing 1 replies (of 1 total)
  • The topic ‘styling the wp_get_archives() menu’ is closed to new replies.