• Hi Everyone!

    My problem seemed easy at first, I know about list pages and its possibilities to exclude subpages like that:

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

    That would hide my subpages and the problem would be settled! However I am calling my pages with Query Posts, and I have no idea how to eclude one page, or the subpages, from the listing.

    <?php query_posts('post_type=page&order=asc'); ?>

    Do you have any idea?
    Thanks for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • $args=array(
       'post_type'=>'page',
       'post_status'=>'publish',
       'post__not_in' => array(114,109),
       'caller_get_posts'=>1,
       'orderby'=>'title',
       'order'=>'ASC'
       );
    
    query_posts($args);

    Returns pages, but not page ids 114 and 109, no sticky posts stuck to the top, sorted by page title in ascending order.

    The ‘post_status’=>’publish’ isn’t really needed, but just showing that field can be used.

    Thread Starter Jeremy Herve

    (@hd-j)

    It works fine! Thank you very much for your help Michael! Topic resolved!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide sub pages or specific page in query_posts’ is closed to new replies.