Forums

PHP Coding Help for WP-list-pages (4 posts)

  1. chazbeaner
    Member
    Posted 4 years ago #

    I'm trying to list my WP pages but exclude one specific page from the list. This is the code that I have:

    <?php wp_list_pages('sort_column=menu_order&depth=2&title_li=','exclude=177'); ?>

    I'm a complete n00b when it comes to PHP but this seems like it should work...what am I missing?

  2. jonimueller
    Member
    Posted 4 years ago #

    You've got too many of these

    '

    in there. Should be like this:

    <?php wp_list_pages('sort_column=menu_order&depth=2&title_li=,exclude=177); ?>

  3. MichaelH
    Volunteer
    Posted 4 years ago #

    There's also this plugin that allows you to set the page as 'invisible' in the admin, then wp_list_pages ignores that page.

    http://www.instinct.co.nz/hide-pages-plugin/

  4. jonimueller
    Member
    Posted 4 years ago #

    Sweet! Thanks for that link!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.