First three images in post excerpt

You can do this pretty easily using the do_shortcode function. Check if an instance of exists in your post content. Here’s a simple function to drop in functions.php that checks the current post’s content for the gallery shortcode: function gallery_shortcode_exists(){ global $post; # Check the content for an instance of with or without arguments $pattern … Read more

Read more tag shows up on EVERY post

I actually never got to add this section to my answer you are referring to. To remove the read more link from the excerpt is quite easy, you just need to compare $count with $excerpt_length. $count will always be between 0 and the value assigned to $excerpt_length. So what we want to do here is … Read more

Get excerpt from $post->post_content

When in the loop, this will produce excerpt from $post->post_content directly: <?php echo wp_trim_excerpt(); ?> Read more HERE. Alternative Solution: If you are not in the loop, then, you may use similar implementation as done in the wp_trim_excerpt function: $text = strip_shortcodes( $post->post_content ); $text = apply_filters( ‘the_content’, $text ); $text = str_replace(‘]]>’, ‘]]&gt;’, $text); … Read more

Remove Ellipses from Excerpt

You haven’t added the second filter, at least not in the code posted. If used, that filter will not print ellipses. // Changing excerpt more function new_excerpt_more($more) { global $post; remove_filter(‘excerpt_more’, ‘new_excerpt_more’); return ‘ <a class=”read_more” href=”‘. get_permalink($post->ID) . ‘”>’ . ‘read more’ . ‘</a>’; } add_filter(‘excerpt_more’,’new_excerpt_more’); Notice the couple of changes I made to … Read more

Modify ‘Read more’ link adding a new class

What (exactly) happens When calling the_content() inside your template, you are able to call it without any parameters. This means, that the function already has the defaults of null for both arguments: The “more” link text and the boolean switch that allows you to strip teaser content before the “more” link text. The the_content() function … Read more