Use a custom blurb when listing wordpress pages

January 18, 2009

How to get a list of pages along with a custom key from each page, used to create a description? The first thing to do is to paste the following code where you want your pages to be listed. It can be your sidebar, or a page template, for exemple. <?php $pages = get_pages(); foreach($pages as $page) { $custom_blurb = get_post_meta($page->ID, 'custom_blurb', true); echo "<h3><a href=\"".get_page_link($page->ID)."\">$page->post_title</a></h3>"; echo $custom_blurb; } ?> Once... [Read the full story]

Page 1 of 11