Ready to get started?Download WordPress


How to display page content using WP_Query (2 posts)

  1. get_username
    Posted 1 year ago #

    Hey all,

    I've looked at all the different WP_Query parameters, but none of them show how to query the current page and the current page's children at the same time. You can do one or the other, but not both from what I can tell.

    Would it be best to use the standard loop if I want pull in just the page content? Isn't there some WP_Query parameter that acts similar to the default loop?

  2. nofearinc
    Posted 1 year ago #

    You could use two different queries for both actions, or better use the standard loop for your page, get the $post variable and check $post->post_parent to verify parentness.

    Something similar is built here - http://wpquestions.com/question/show/id/160

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.