• I’m trying to use the parent_id to control my sidebars but when I display ther post->parent_id it is always zero. Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • do you mean:

    $post->post_parent

    it might also be disturbed by the loop/query in the main content;

    to reset this, you could try to add: wp_reset_query(); before your conditional statement.

    Thread Starter stevieg

    (@stevieg)

    So simple. Yes that’s what was needed. Cheers

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘parent_id always zero’ is closed to new replies.