Timeline for Display child pages full template including the content
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 25, 2017 at 15:37 | comment | added | Worduoso |
setup_postdata($post); in theory is supposed to "switch" context of the current post, so inside your page template, you supposed to see content of the child page... If this doesn't happen, try maybe adding global $post; line somewhere before foreach . It worked on my test site, but there could be some variation theme to theme... Oh, and stripping header and footer can be easy - just define a variable in parent template, then check it inside child page (and skip header/footer includes)
|
|
Jul 20, 2017 at 22:55 | comment | added | GrampaRay | Thanks, that was what I was going for. I will strip the get_header() and get_footer() and carry on. Only thing is, I can't strip the get_content() and surely it will display the content of the parent and not the child :( I will have to find a workaround for that. Thank you very much! | |
Jul 20, 2017 at 22:55 | vote | accept | GrampaRay | ||
Jul 20, 2017 at 21:45 | history | answered | Worduoso | CC BY-SA 3.0 |