wp_list_pages custom before and after parameters

  1. mkormendy

    It would be nice to have custom before and after parameters for the wp_list_pages template tag.

    For example:

    $defaults = array(
        'depth'       => 0,
        'show_date'   => '',
        'date_format' => get_option('date_format'),
        'child_of'    => 0,
        'exclude'     => '',
        'title_li'    => __('Pages'),
        'echo'        => 1,
        'authors'     => '',
        'sort_column' => 'menu_order, post_title'),
        /* add handling for the following parameters */
        'custom'      => 'html', // or custom, or whatever logic
        'before'      => '<li>beforetext',
        'after'       => 'aftertext</li>');

    I realize that this can be done with a plugin, however it seems like an option that should have been implemented like many other lists found in the WordPress base code.

    Posted: 11 years ago #
  2. Edward Caissie

    Are you referring to something other than the 'link_before' and 'link_after' parameters added in 2.7?

    Posted: 9 years ago #
  3. Jen

    Closing due to a year passing with no comment.

    Posted: 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    1 Vote
  • Status

    Sorry, not right now