$post->ID not working with child_of
-
I can get child_of to list subpages, but only if I hardcode the post_id in the code.
If I try and use the codex code given for wp_list_pages, $post->ID and the_ID(); returns a bad number!
My page id is 11, but it keeps returning 3, even when that’s not the ID of the currently navigated page.
What’s even more frustrating is that I stopped yesterday when I saw it working, came back today without changing anything and it’s broken!!
Am I just using $post->ID or the_ID() in the wrong contexts? Why can’t I get the write number from it?
- The topic ‘$post->ID not working with child_of’ is closed to new replies.