ok, so I noticed nobody is getting the answers they need, or getting their questions answered, so I have decided to start posting tips and tricks to answer some commonly asked questions.
Here is the first one.
How to nest a sub-page on a page. Or how to show a child page on a parent page.
Copy this to your page.php file right before <php get_sidebar;>
<?php $pages = get_pages('child_of='.$post->ID.'&sort_column=post_date&sort_order=desc&parent='.$post->ID); $count = 0; foreach($pages as $page) { $content = $page->post_content; if(!$content) continue; if($count >= 2) break; $count++; ?>
<a href="<?php echo get_page_link($page->ID) ?>"><h1 class="title"> <?php echo $page->post_title ?> </h1></a> <?php echo $page->post_content ?>
<?php
}
?>
If you find that it pushes your sidebar down paste it between <get_sidebar> and <get_footer> Some themes need it put between the sidebar and footer to reduce overlay.
GMedia123
Web Developer
Tech Support
Home Theater PC's w/voice control
If you found any of this useful or it helped you in any way please consider a donation or at least leave a reply.
Donate or Pay for Services here
Tags: categories category Comments database error feed Help installation nextgen-gallery page php plugin plugins post posts RSS sidebar tags theme Themes upgrade wordpress upload sub-pages