Forums

Including/Excluding Pages (5 posts)

  1. pbmaxca
    Member
    Posted 4 years ago #

    I have this code:

    <div class="Menu">
      <div class="MTL"></div><div class="MTR"></div>
    
    
     </div>

    I want to only include pages: 7,93,95,97, and the homepage.
    I attempted to change the code, but it wasn't working. Can someone help me out?

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    wp_list_pages('include=7,93,95,97&sort_column=menu_order&title_li=&echo=0');

    Change your list pages bit to that.

  3. pbmaxca
    Member
    Posted 4 years ago #

    OHHHHH! I was putting the numbers after the sort...not before!

    Thanks!

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    It would work regardless of where you put them...

    wp_list_pages('sort_column=menu_order&title_li=&echo=0&include=7,93,95,97');

    That will work just the same.

  5. Xamataca
    Member
    Posted 4 years ago #

    It always amazes me why people don't even bother to search at "codex" (docs):
    http://wordpress.org/search/exclude+pages
    there you go, the first result... easy and fast

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.