• I’m currently using the get_pages() function to return child pages of a parent page. I’m getting the content out of the returned array fine, but what I’d like to know is, is it possible to get the content while still preserving the HTML of each “post_content” array element.

    As I say, the code structure I’m using is working fine and returns the content MINUS THE HTML.

    $array = get_pages($arguments);
    foreach ($array as $page)
    {
    $content = $page->post_content;
    }

    ..How can I make it so $content contains “<p>content</p>”, for example as opposed to “content”, which it currently returns?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Preserve HTML with get_pages’ is closed to new replies.