WP_Query accessing parent
-
Hello,
I have the following code:
$insearchofaparent = new WP_Query(); $insearchofaparent->query('page_id=' . $post->post_parent); while ($insearchofaparent->have_posts()) : $insearchofaparent->the_post(); $blah2 = printf(the_title()); endwhile;
I am trying to get the ID of the page PARENT in the variable $blah2,
but $blah2 = $insearchofaparent->post_parent; does not seem to do the trick, but the_title() does work,
any tips would be welcome!thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WP_Query accessing parent’ is closed to new replies.