Timeline for How to get the post's parent ID?
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 24, 2016 at 10:11 | comment | added | Jack |
You might want to add global $post
|
|
Apr 25, 2013 at 11:42 | comment | added | saifur | $post->post_parent is working for me. print your $post object,then you will there is [post_parent] is there. | |
Apr 25, 2013 at 9:53 | history | edited | tfrommen | CC BY-SA 3.0 |
improved formatting
|
Apr 25, 2013 at 8:09 | comment | added | metalzade | I was able to get the ID of the blog page by get_option('page_for_posts') but no success in custom post type as $post->post_parent returns 0. | |
S Apr 25, 2013 at 7:54 | review | Low quality posts | |||
Apr 25, 2013 at 9:28 | |||||
S Apr 25, 2013 at 7:54 | review | First posts | |||
Apr 25, 2013 at 9:53 | |||||
Apr 25, 2013 at 7:35 | history | answered | saifur | CC BY-SA 3.0 |