• I have this code to exclude the pages, However, the number i want to exclude is page 19.. There are 2 numbers in that code “2,17” where do I place my page 19 and where do i get my second number

    <?php wp_list_pages(‘exclude=2,17&title_li=<h2>’ . __(‘Pages’) . ‘</h2>’ ); ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can have as many numbers there as you want…
    <?php wp_list_pages('exclude=2,17,19,20,21,22,23,156,497&title_li=<h2>' . __('Pages') . '</h2>' ); ?>
    What “second number”?
    In admin > Manage > Pages you can always check the ID# of any and every Page.

    Thread Starter juber0

    (@juber0)

    Sorry, 19 is in the admin manage page. SOrry if this sounds like a noobish. I just started learning PHP once i started with this page, but can it be something like this

    <?php wp_list_pages(‘exclude=ANYNUMBER,19&title_li=<h2>’ . __(‘Pages’) . ‘</h2>’ ); ?>

    Or must ANYNUMBER be a actual number. If so where is it derived from?

    The numbers listed in the exclude parameter are the Page ID#s that you can see in the Manage > Pages panel. You list those numbers that you don’t want to be listed in the menu (where you use the wp_list_pages template tag).
    You always have to type exactly the ID number – there is no “ANYNUMBER” option (though I don’t really understand what you mean by “ANYNUMBER”). You can have a long list of numbers or none – if you don’t want to exclude anything.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Code question’ is closed to new replies.