ThemeShaper Forums » Thematic

[closed]

How to get correct page parent when custom loop present?

(2 posts)
  • Started 13 years ago by automatyk
  • Latest reply from automatyk
  • This topic is resolved
  1. automatyk
    Member

    Hello Thematic users! I'm hoping one of you can help me figure this issue out. I've run out of ideas.

    I have a custom wp_query defined in functions.php of my child theme which is adding posts to thematic_belowpost of a sub page. What I want to do is grab $the_ID of that pages grandparent (so I can set a custom sidebar). However, my attempts at doing so just return $the_ID of the last post displayed in the belowpost are and not the id of the actual page I'm on! How do I get the grandparent of the actual page?

    Thanks,
    Automatyk

    Posted 13 years ago #
  2. automatyk
    Member

    Well well well... wouldn't you know it that magical wp_reset_query(); function saved the day. I put it in at the bottom of my special loop and vîola everything now works!

    Posted 13 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.