• Any suggestions why wp_get_archives() may not generating the class=”current_page_item”? Looked everywhere but couldn’t find an answer. Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Because it’s generating a list of archives – not a list of pages. Perhaps you’re thinking of wp_list_pages?

    Thread Starter hardwork64

    (@hardwork64)

    Thank you esmi for your reply. I meant a list of archives. I was under the impression that as wp_get_archives() generates a list it would also generate a current_page_item to indicate the archive on view. That could then be used, for example, to target the particular link as when it’s a list of pages.

    Unfortunately, wp_get_archives() isn’t nearly as CSS friendly as wp_list_pages, from what I recall. No “parent” class generated. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Archive and current_page_item’ is closed to new replies.