The MU forums have moved to

Ditch the dupe in wp_list_pages (2 posts)

  1. drmike
    Posted 17 years ago #

    One of the common pet peeves over in land is how if you have a static front page, the page that you use gets listed twice in wp_list_pages if the theme uses a static home link like most of them do.

    Here's a work around:

    $tmpexclude =  get_option('page_on_front');
    $tmpline = 'sort_column=menu_order&depth=1&title_li=&exclude=' . $tmpexclude;

    Gotta admit that you have to do this in each theme while adjusting the content of the $tmpline.

    Anyone care to tackle this in core code?

  2. mrjcleaver
    Posted 17 years ago #

    Would this be written as a filter on wp_list_pages?

About this Topic

  • Started 17 years ago by drmike
  • Latest reply from mrjcleaver