Support » Fixing WordPress » Pages displaying links to sub-pages

  • I’m looking for a “how – to” or a plugin that will provide me with a single page that dynamically shows me sub-pages.

    My usage is this:

    I receive reviews from people for races. The Parent page is the form for them to submit the race review to me.

    Right now, every time I get a review, I create a sub-page for the race, and add each review as it comes in. Then I drag that race to a menu to display it.

    I want to switch this drop down menu to a single page that will show me each sub-page as I add them to my site.

    Thoughts?

Viewing 2 replies - 1 through 2 (of 2 total)
  • http://codex.wordpress.org/Function_Reference/wp_list_pages

    This is a shortcode I wrote for my needs – hopefully you can use this as is or modify to your needs. Not garanteed to be 100% perfect.

    Just put the code in your functions.php file.

    // ---------------- Shortcode for Subpages list
    
    function mysubpageslist()
    	{
    		// Exclude the heading using 'title_li='
    		// Show only child pages using child_of='.$post->ID.
    		// Use echo=0 to prevent output of shortcode to printed before text in page or post
    		// Sort by page order using 'sort_column=menu_order'
    		// Separate parameters with a &
    
    		global $post;	// Must have this to support $post->ID
    
      		return '<ul class="mysubpageslist">'.wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0&sort_column=menu_order').'</ul>';
    	}
    
    add_shortcode('mysubpageslist', 'mysubpageslist');
    
    // usage: [mysubpageslist]

    Then just put [mysubpageslist] in your page.

    i think pagelist plugin can help you.
    http://wordpress.org/plugins/page-list/

    note: make sure you create subpage to proper parent page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pages displaying links to sub-pages’ is closed to new replies.