WordPress.org

Ready to get started?Download WordPress

Forums

Quick question on a query... (2 posts)

  1. echstudios
    Member
    Posted 5 years ago #

    How can I query only the pages that use "Services" as a parent? Another option is to query pages using "services.php" as a page template? Either one should work.

    I got this working fine, but I can only get it to bring back ALL my pages, or just one specific page.

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

    Thanks a bunch.

  2. MichaelH
    Member
    Posted 5 years ago #

    Here a query based on the page template:
    http://wordpress.org/support/topic/207314

    But couldn't you just use the child_of parameter with the template tag, wp_list_pages()? Here's one possibility: http://wordpress.org/support/topic/184483

Topic Closed

This topic has been closed to new replies.

About this Topic