/ Published in: PHP
This simply pulls 165 characters from a page/post. Important to reset the query.
Expand |
Embed | Plain Text
<?php query_posts('pagename=about'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div><h4>Type your title here</h4> <p><?php echo substr(strip_tags($post->post_content), 0, 165); ?>... <a href="<?php bloginfo('url'); ?>/about">Read More</a></p></div> <?php endwhile; endif; //Reset Query wp_reset_query(); ?>
You need to login to post a comment.
