New answers tagged

0

Your code only control the length of the excerpt For read more link you add this code to your function.php // Replaces the excerpt "Read More" text by a link function new_excerpt_more($more) { global $post; return '<a class="moretag" href="'. get_permalink($post->ID) . '"> Read the full article...</a>'; } add_filter('excerpt_more', ...


0

One solution could be to create a custom "read more" function in your themes functions.php // excerpts function your_excerpts( $words = 45, $allowed_tags = '', $container = 'p', $smileys = 'yes' ) { global $post; if ( $allowed_tags == 'all' ) $allowed_tags = ...


2

Now you can simply use the get_the_excerpt( $postID ) function. Since: WordPress 4.5.0 introduced the $post parameter.


3

I tested following code and it worked just fine for me: function my_name_shortcode( $atts ) { return "<h3>PRASAD</h3>"; } add_shortcode( 'name', 'my_name_shortcode' ); add_filter( "the_excerpt_rss", "do_shortcode" ); The result can be seen in below screenshot.



Top 50 recent answers are included