how to use the_excerpt for two post queries?

function excerpt($limit) { $excerpt = explode(‘ ‘, get_the_excerpt(), $limit); if (count($excerpt)>=$limit) { array_pop($excerpt); $excerpt = implode(” “,$excerpt).’…’; } else { $excerpt = implode(” “,$excerpt); } $excerpt = preg_replace(‘`\[[^\]]*\]`’,”,$excerpt); return $excerpt; } write below code in your template. <?php echo excerpt(25); ?>

multiple excerpt length and styles

Are you aware of the uses of the More Tag? Customizing the Read More shows many uses of variable length teasers with variable link phrases to read more. For example, this markup entered in the Post editor will provide a link with Read the rest of this story in the anchor text. <!–more Read the … Read more

Change image link in excerpt to point to post

Images are embedded in post content as pretty much straight HTML. <a href=”http://192.168.1.10/wp_release/wp-content/uploads/2011/01/boat.jpg”> <img src=”http://192.168.1.10/wp_release/wp-content/uploads/2011/01/boat.jpg?w=300″ alt=”” title=”boat” class=”size-medium wp-image-544″ height=”198″ width=”300″> </a> There is no easy way to alter that. You can alter it, but it means regexing the post body content or using an html parser like Simple HTML DOM Parser (Not an endorsement, … Read more

More link – not text

you can use this code; function new_excerpt_more( $more ) { return ‘ <div id=”daha”><a class=”read-more” href=”‘. get_permalink( get_the_ID() ) . ‘”>Read More</a></div>’; } add_filter( ‘excerpt_more’, ‘new_excerpt_more’ );