WordPress.org

Forums

Exclude Page Code Fix (7 posts)

  1. Haris Nadeem
    Member
    Posted 8 years ago #

    I don't know PHP, and I want to exclude pages from the page list in my header. How do I do that? I read http://codex.wordpress.org/wp_list_pages#Exclude_Pages_from_List

    but my title code is a bit different. And when I try to use this it gives me errors. Please some one make me the code to exclude pages (page ID 228) so that I can put it in my site.

    The page list code is something like this in my theme:

    <?php wp_list_pages ('sort_column=menu_order&depth=1&title_li='); ?>

    My blog: http://www.sizzledcore.com

    Thanks,

    Haris

  2. Haris Nadeem
    Member
    Posted 8 years ago #

    Someone please me out! I need this urgently.

    Thanks,

    Haris

  3. Haris Nadeem
    Member
    Posted 8 years ago #

    Anyone here? :(

  4. ah642403hy
    Member
    Posted 8 years ago #

    I think that's what you want:
    <?php wp_list_pages ('sort_column=menu_order&depth=1&exclude=228&title_li='); ?>

  5. Haris Nadeem
    Member
    Posted 8 years ago #

    Hey, thanks. I'll try it and let you know :)

  6. Haris Nadeem
    Member
    Posted 8 years ago #

    It's working! Thanks a lot! :D

  7. Simon Wheatley
    Code for the People
    Posted 7 years ago #

    This plugin does what you want, with no template meddling needed: http://wordpress.org/extend/plugins/exclude-pages/

    HTH, Simon

Topic Closed

This topic has been closed to new replies.

About this Topic