Web Development Nuxt.js Subjective
Apr 26, 2013

Describe wp_list_pages() function in wordpress?

Detailed Explanation

It displays a list of WordPress Pages as links. It is often used to customize the Sidebar or Header, but may be used in other Templates as well.

 Syntax:

         <?php wp_list_pages( $args ); ?> 

                 <?php $args = array(

                                'depth'        => 0,

                              'show_date'    => '',

                              'date_format'  => get_option('date_format'),

                                 'child_of'     => 0,

                                'exclude'      => '',

                                 'include'      => '',

                                   'title_li'     => __('Pages'),

                                'echo'          => 1,

                               'authors'       => '',

                             'sort_column'   => 'menu_order, post_title',

                               'link_before'  => '',

                                 'link_after'   => '',

                                 'walker'       => '',

                               'post_type'    => 'page',

                               'post_status'  => 'publish' 

                  ); ?>

      Example:

                     <?php wp_list_pages('include=273,274,275,276&sort_column=menu_order&title_li=' ); ?>

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback