Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Content Views

    (@pt-guy)

    Hello,
    I’m pleased that you like our plugin ??

    Are you using shortcode (somethings like this:
    [your_shortcode_name some_parameters] image caption here [/your_shortcode_name]) to manage image caption?

    Thread Starter Blunderdog

    (@blunderdog)

    If I’m understanding you correctly, no. I’m using the shortcode for your plugin, otherwise the post being displayed is a typical WordPress post with no shortcodes used.

    I’m not really sure if I’m following what you’re saying though.

    Plugin Author Content Views

    (@pt-guy)

    Can you include HTML content (copy from “Text” tab in post editor) of a post?
    Thank you,

    Thread Starter Blunderdog

    (@blunderdog)

    Ah ok… sure enough. I never noticed how WP handles captions.

    [caption id="attachment_340" align="alignnone" width="960"]<img class="wp-image-340 size-full" src="https://scenicstage.com/live/wp-content/uploads/2016/07/BAPhamlet.jpg" alt="Christopher Smith leads the cast of Back Alley Productions presentation of hamlet. Photo by Back Alley Productions" width="960" height="675" /> Christopher Smith leads the cast of Back Alley Productions presentation of hamlet. Photo by Back Alley Productions[/caption]
    Plugin Author Content Views

    (@pt-guy)

    Thank you for your information.
    In next CV version, new option will be introduced to remove any content of HTML tags, shortcode from excerpt.
    Best regards,

    Plugin Author Content Views

    (@pt-guy)

    Hello,
    This problem was solved in version 1.8.9.
    Please update then check.
    Best regards,

    Hi,

    It seems I still have the problem on my website.
    Any idea whats going wrong?

    https://www.insearchofumami.com/blog/

    I added the following code to the fuctions.php file of CV.

    $result = substr_replace($result,'',0,strpos($result,'1 ')+2);

    To the trim_words function.
    That helped.. but when a new update will come out it will overwrite my added code. Do you know how I could add this to the child theme’s functions.php file?

    Thank you in advance!

    Plugin Author Content Views

    (@pt-guy)

    Dear @jaydee01
    Please:
    1/ remove that code in function trim_words
    2/ add this code to file functions.php of your active theme:

    // Content Views - Modify excerpt
    add_filter( 'pt_cv_trim_length_excerpt', 'cvp_trim_length_excerpt', 100, 3 );
    function cvp_trim_length_excerpt( $args, $full_excerpt, $length ) {
    	$args = substr_replace( $args, '', 0, strpos( $args, '1 ' ) + 2 );
    	return $args;
    }

    Best regards,

    Perfect!
    Works like a charm.
    Thank you so much.

    Have a good one,

    Plugin Author Content Views

    (@pt-guy)

    It is my honor.
    Best regards,

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Excerpt to not show image caption’ is closed to new replies.