Home › Forums › Back End › How can I display all of my pages on a single page in WordPress? › Re: How can I display all of my pages on a single page in WordPress?
June 15, 2011 at 5:15 pm
#72929
Participant
Okay, here is an update. I found a working solution and shows only the top level pages. that I can even add mark up to. But another issue came up. Here is the code:
$pages = get_pages('parent=0');
foreach ($pages as $pagg) {
$option .= $pagg->;
$option .= $pagg->post_title;
$option .= $pagg->post_content;
$option .= $pagg->;
echo $option;
}
?>
The problem is the content from the pages has been stripped of all it’s html. There’s no formatting in it. Any way I can keep it?