Title: get_pages function
Last modified: August 19, 2016

---

# get_pages function

 *  [davidandre](https://wordpress.org/support/users/davidandre/)
 * (@davidandre)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/get_pages-function/)
 * Hi everybody,
 * I am using the get_pages function which works perfectly but,
    i don t want the
   content of every page to appear after the title. i dont want neither a simple
   wp_list_pages …
 * I would like to use the get_pages function but to be able to put the text i want
   after each title…Maybe using custom fiels but the idea is to be very flexible.
   If there is a new page to include i should be able to do the same thing.J ust
   the title of the page and a text which is nothing about the content oh the page
   included…
    <blockquote$pages = get_pages(‘child_of=’.$post->ID.’&sort_column=
   post_date&sort_order=desc’); $count = 0; foreach($pages as $page) { $content 
   = $page->post_content; if(!$content) continue; if($count >= 10) break; $count
   ++; $content = apply_filters(‘the_exerpt’, $content); ?> <h2>ID) ?>”><?php echo
   $page->post_title ?></h2> <div class=”entry”>
 * If you have an idea…whaooo you `d save me!
 * cheers,
    David

The topic ‘get_pages function’ is closed to new replies.

## Tags

 * [get_pages](https://wordpress.org/support/topic-tag/get_pages/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [davidandre](https://wordpress.org/support/users/davidandre/)
 * Last activity: [15 years, 11 months ago](https://wordpress.org/support/topic/get_pages-function/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
