Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Help allowing HTML in excerpt

Home / Forums / Ascend Theme / Help allowing HTML in excerpt

This topic is: Resolved
[Resolved]
Posted in: Ascend Theme
November 27, 2019 at 5:29 am

Hi guys,

I’m trying to allow HTML in excerpt using this method:

However, I am using the function below that you provided before in my child theme to remove the elipsis. I am struggling to create a method that combines both.

Any help?

function child_init() {
remove_filter( ‘get_the_excerpt’, ‘ascend_custom_excerpt_more’ );
add_filter( ‘get_the_excerpt’, ‘custom_custom_excerpt_more’ );
}
add_action( ‘init’, ‘child_init’ );

function custom_custom_excerpt_more( $excerpt ) {
$excerpt_more = ”;
if ( has_excerpt() ) {
global $ascend;
if ( ! empty( $ascend[‘post_readmore_text’] ) ) {
$readmore = $ascend[‘post_readmore_text’];
} else {
$readmore = __( ‘Read More’, ‘ascend’ );
}
$excerpt_more = ‘‘ . $readmore . ‘‘;
}
return $excerpt . $excerpt_more;
}

  • The forum ‘Ascend Theme’ is closed to new topics and replies.