more tag not working when displying subpages. (3 posts)

  1. Mannyk29
    Posted 6 years ago #

    Hi there,

    I have more tags on all my pages on wordpress CMS site. When I use the following code to display the sub-pages of a current page, it shows the full page even though I have used the apply_filter ('the_content', $content) function on the retrieved page.

    `<?php $pages = get_pages('child_of='.$post->ID.'&sort_column=post_date&sort_order=desc&parent='.$post->ID.'&heirarchical=1');
    $count = 0;
    $more = 1;
    foreach($pages as $page) {
    $content = $page->post_content;
    $content = apply_filters('the_content', $content);

    ID) ?>"><h1 class="title"> <?php echo $page->post_title ?> </h1> <?php echo $content ?>

    thanks for your assistance.

  2. esmi
    Forum Moderator
    Posted 6 years ago #

  3. Mannyk29
    Posted 6 years ago #

    thanks for your help.

    The codex page you recomended said that

    `global $more;
    $more = 0;

    in the loop. but my code for calling sub_pages is just after the loop. so where do I place that code.


Topic Closed

This topic has been closed to new replies.

About this Topic