Plugin Author
Ajay
(@ajay)
Hi,
The plugin strips out shortcodes using the strip_shortcodes
function. Do you know what plugin / theme creates the wc_row shortcode?
You can write your own excerpt function to filter crp_excerpt
. Something on the lines of this.
function crp_overwrite_excerpt( $output, $id, $excerpt_length, $use_excerpt ) {
$output = PUT A FUNCTION HERE TO GET THE THEME EXCERPT FOR $id
return $output
}
add_filter( 'crp_excerpt', 'crp_overwrite_excerpt', 10, 4 );
hi,
shortcodes plugin:
WP Canvas – Shortcodes & Shortcodes Ultimate
Theme is:
Hueman
dont know where to find the themes funktion for excerpts 🙁
Plugin Author
Ajay
(@ajay)
You should ask the author of Hueman.
i probably just need to edit how your plugin gets the excerpt to something like this
<?php echo strip_tags(get_the_excerpt()); ?>">
just need to know where i can edit this??
already found the Function to create an excerpt for the post:
function crp_excerpt( $id, $excerpt_length = 0, $use_excerpt = true ) {
$content = $excerpt = '';
if ( $use_excerpt ) {
$content = get_post( $id )->post_excerpt;
}
if ( '' == $content ) {
$content = get_post( $id )->post_content;
}
$output = strip_tags( strip_shortcodes( $content ) );
if ( $excerpt_length > 0 ) {
$output = wp_trim_words( $output, $excerpt_length );
}
return apply_filters( 'crp_excerpt', $output, $id, $excerpt_length, $use_excerpt );
}
strip tags seems to be already build in but not working?!
any idea?
Plugin Author
Ajay
(@ajay)
Hi,
That’s what I meant by my earlier reply. I already have strip_shortcode
and strip_tags
which strips out any HTML and inbuilt shortcodes.
Which is why I said maybe checking with the author of Hueman, if he is doing anything special to ensure his shortcodes are stripped