Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

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?

#72929
noahgelman
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?