I wont to get short content in my footer area. So, I write my code as follow:

   $page = get_page_by_title( 'About us' );
   $content = apply_filters('the_content', $page->post_content);  ?>
   <p> <?php echo $content; ?> </p>

By this code I get full page content. So how can I get short content till my setted <--read more--> link in the about us page?

1 Answer 1


I believe your best solution will be to setup postdata and the making use of the the_content() template tag

$post = get_page_by_title( 'About us' );
setup_postdata( $post ); ?>
    <p> <?php the_content(); ?> </p>
<?php wp_reset_postdata(); ?>
  • My pleasure, enjoy :-) Apr 27, 2015 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.