WordPress.org

Support

Support » How-To and Troubleshooting » more tag not working when displying subpages.

more tag not working when displying subpages.

  • 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;
    if(!$content)
    continue;
    $count++;
    $content = apply_filters(‘the_content’, $content);
    ?>

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

    thanks for your assistance.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘more tag not working when displying subpages.’ is closed to new replies.
Skip to toolbar