I want to get this function from functions.php file
function twentyseventeen_excerpt_more( $link ) {
if ( is_admin() ) {
return $link;
}
$link = sprintf( '<p class="link-more"><a href="%1$s" class="more-link">%2$s</a></p>',
esc_url( get_permalink( get_the_ID() ) ),
/* translators: %s: Name of current post */
sprintf( __( 'Continue readingggg<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ), get_the_title( get_the_ID() ) )
);
return ' … ' . $link;
}
add_filter( 'excerpt_more', 'twentyseventeen_excerpt_more' );
And in my shorcode file to remove the 'Continue readinggg' text with empty string for example (or simply remove it). How can i do it ? I have to use into this statement:
if($content=='true'){
the_content();
}
if( $excerpt=='true' ) {
if( $readmore=='true' ) {
echo get_the_excerpt()."<a href='".get_permalink($article_id)."'><button>Read More</button></a>";
} else {
the_content();
}
}
How it can be done ?