get_pages
-
Hi, i am using a normal get_pages function like that
<?php $mypages = get_pages('child_of='.$post->ID.'&sort_column=post_date&sort_order=desc'); $count = 0; foreach($mypages as $page) { $content = $page->post_content; if(!$content) continue; if($count >= 2) break; $count++; $content = apply_filters('the_content', $content); ?> <h2><a href="<?php echo get_page_link($page->ID) ?>"><?php echo $page->post_title ?></a></h2> <div class="entry"><?php echo $content ?></div> <?php } ?>But now i would like to complicate things:)
i d like to get all the title h2, but just the content of the h2 i click on…. It means staying in the same pagePossible? any idea? would appreciate a lot,
cheers,
David
pd:i ve got the site in local
The topic ‘get_pages’ is closed to new replies.