How to force excerpts / teasers in the loop

EDIT OK, there is a very hidden native function, get_extended() that I never knew about and greatly explained by @kaiser in his answer. My answer should only be an extension to the answer by @kaiser ORIGINAL ANSWER There is no native function to do this. The best here would be to use a PHP function … 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

Move excerpt meta box to above content editor

It’s simple, just unregister postexcerpt box first then add another one on the top. Here is my code add_action( ‘admin_menu’, function () { remove_meta_box(‘postexcerpt’, ‘post’, ‘normal’); }, 999 ); add_action(‘edit_form_after_title’, ‘post_excerpt_meta_box’);