Remove “Continue Reading” Link From the Teaser Excerpt Only

Change standard text for all excerpts: function custom_excerpt_more($more) { global $post; $more_text=”…”; return ‘… <a href=”‘. get_permalink($post->ID) . ‘”>’ . $more_text . ‘</a>’; } add_filter(‘excerpt_more’, ‘custom_excerpt_more’); Create your own excerpt function: // Rafael Marques Excerpt Function 😉 function rm_excerpt($limit = null, $separator = null) { // Set standard words limit if (is_null($limit)){ $excerpt = explode(‘ … Read more

How to get the unfiltered excerpt, without […] or auto-excerpting

Why don’t you use the global $post variable? It contains an object with the content as it is on the db row corresponding to that post. Here’s how to use it: global $post; // If for some reason it’s readily accessible, invoke it if($post->post_excerpt != ”) { echo($post->post_excerpt); } Or: $my_post = get_post($post_id); if($my_post->post_excerpt != … Read more

How to control manual excerpt length?

Take a look on my answer here: Best Collection of Code for your functions.php file If I understood your question correctly, it does what you are looking for. Place this in functions.php: function excerpt($num) { $limit = $num+1; $excerpt = explode(‘ ‘, get_the_excerpt(), $limit); array_pop($excerpt); $excerpt = implode(” “,$excerpt).”… (<a href=”” .get_permalink($post->ID) .” “>Read more</a>)”; … Read more

Adding a rich text editor to Excerpt

Just replace the default output. Make sure you unescape the excerpt before you send it to the editor: add_action( ‘add_meta_boxes’, array ( ‘T5_Richtext_Excerpt’, ‘switch_boxes’ ) ); /** * Replaces the default excerpt editor with TinyMCE. */ class T5_Richtext_Excerpt { /** * Replaces the meta boxes. * * @return void */ public static function switch_boxes() { … Read more

How to remove “read more” link from custom post type excerpt

Put the following code in functions.php to show “read more” on all post types except custom_post_type. function excerpt_read_more_link($output) { global $post; if ($post->post_type != ‘custom_post_type’) { $output .= ‘<p><a href=”‘. get_permalink($post->ID) . ‘”>read more</a></p>’; } return $output; } add_filter(‘the_excerpt’, ‘excerpt_read_more_link’);

Compare the_excerpt() to the_content()

What you’re trying to do with the video is exactly what Post Formats were created to handle. Add this to functions: add_theme_support( ‘post-formats’, array( ‘video’ ) ); And then this to handle your Read More link: if( !has_post_format( ‘video’ ) ) { echo ‘<a href=”‘ . get_permalink() . ‘”>Read More&hellip;</a>’; } else { echo ‘<a … Read more