WordPress Custom wp_list_pages output

/ Published in: PHP
Save to your folder(s)

Quick fix to tweak output for WordPress wp_list_pages()

Copy this code and paste it in your HTML
  1. <ul>
  2. <?php echo preg_replace('@\<li([^>]*)>\<a([^>]*)>(.*?)\<\/a>@i', '<li$1><span class="navl"></span><a$2>$3</a><span class="navr"></span>',wp_list_pages('echo=0&title_li=&depth=1&sort_column=post_date')); ?>
  3. </ul>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.