• Resolved vivalis

    (@vivalis)


    I have a Strong Testimonials view in a sidebar, Small Widget style. When setting the content to “automatic excerpt” and “expand content in place”, there is a problem/bug with short testimonials (length equal or less than the pre-defined excerpt length): The last word of the testimonial gets replaced with an inline non-functional read more link.

    How it should be: Testimonials with a length equal or less than the pre-defined excerpt lenght should be fully shown, without a read more link.

    With longer testimonials, it works as expected (working read more link on new line).

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support beatrice12

    (@beatrice12)

    Hello @vivalis,

    Thanks for reaching out to us!

    Unfortunately, this is a bug. Our development team is aware of this issue and we will fix it in a future update. Apologies for the trouble!

    Warm regards,

    Beatrice.

    This is still a bug in version 3.1.9.

    The superfluous Read More link also replaces some of the testimonial text and when you click it, nothing happens, the Read more just stays there. It’s a pretty bad bug.

    Only solution is to roll back to 3.1.7.

    Plugin Support beatrice12

    (@beatrice12)

    Hello @acurran,

    Our devlopment team is still working on this issue. I can let you know when the update which has a fix for this issue is released if you want to.

    Warmly,

    Beatrice.

    acurran

    (@acurran)

    Why is this marked as resolved? This bug is still present in your latest release 3.1.11. The last 4 releases have this bug.

    See: https://imgur.com/aX0e5GZ

    Yes, it still doesn′t work correctly as acurran say.

    I have Version 3.1.11?too.

    • This reply was modified 11 months, 3 weeks ago by alinobb.

    Any update on this issue?

    I am also seeing the same problem with 3.1.11, with everything else at latest versions. It’s making the testimonials look very unprofessional.

    Can you at least recommend a workaround until it’s resolved?

    Thanks

    nadine3f

    (@nadine3f)

    I have the same issue on a client’s website. Any updates on that issue?

    I am facing the same issue. Definitely not resolved.

    still not solved unfortunately

    Hey everyone,

    Since the plugin developers have decided not to fix this, a temporary solution to fix this bug is to use JavaScript/jQuery to dynamically count the words and hide the “Read more” link if the content is 55 words or fewer. Here’s how you can do it in a WordPress child theme.

    1. Create the js directory:

    In your child theme directory, create a directory named js if it doesn’t already exist.

    2. Create the custom.js file:

    In the js directory of your child theme, create a file named custom.js and add the following JavaScript code:

    jQuery(document).ready(function($) {
    $('.wpmtst-testimonial-content').each(function() {
    var contentText = $(this).text();
    var wordCount = contentText.split(/\s+/).length;

    if (wordCount <= 50) {
    $(this).find('.readmore-toggle').hide();
    }
    });
    });

    3. Enqueue child theme’s custom JavaScript file

    Edit functions.php in your child theme, add the following code to enqueue your custom JavaScript file:

    function custom_scripts() {
    wp_enqueue_script( 'custom-js', get_stylesheet_directory_uri() . '/js/custom.js', array('jquery'), null, true );
    }
    add_action( 'wp_enqueue_scripts', 'custom_scripts' );

    4. Clear Existing Cache

    Clear any caching that might be in place to ensure the latest version of your files is loaded.

    5. Check if the script is loaded:

    Inspect your site’s HTML source to ensure custom.js is being included.

    Conclusion:

    By following these steps, your custom JavaScript file will be correctly enqueued and executed, hiding the “Read more” link for testimonials with 50 words or fewer.

    Thanks so much @akojif

    I have applied your code and can confirm that it’s working.

    There are still a few testimonials where the text is truncated without a Read more link, others with truncated text where there is a Read more link, but clicking on it doesn’t do anything and others where there is a Read more link that doesn’t need to be there as all of the text is displayed. But they are the exception – looks like the problem testimonials mostly have a similar character count of slightly more than the cutoff.

    However, this could be a caching issue (the site doesn’t have a caching plugin and I’ve put Cloudflare into development mode, so I don’t think so), and that may clear up over time, but as is now it’s working so much better than it was before, so I thank you very much for your time and sharing your code here.

    • This reply was modified 4 months, 1 week ago by chillstarr.

    @chillstarr You are welcome! Regarding the issue you are experiencing, I think it can be easily fixed from the plugin’s dashboard by tweaking the settings. I’d have loved to explain how to do it, but I don’t know what your current settings look like.

    Hi @akojif

    Are these the settings that could be causing it?

    Doesn’t look like image pasting is going to work. Here’s what I have in the Fields section of Strong Testimonials settings:

    Dropdown: [automatic excerpt]
    Dropdown: [custom length] the first [75] words

    Add a Read more link to Dropdown: [expand content in place]

    Dropdown: [with an ellipsis]

    with link text to read more [Read more]

    and link text to read less [enter a phrase]

    Show html content is unchecked

    I probably was trying different settings while I was trying to get this to work originally and not sure what they were on by default.

    Any help would be great!

    • This reply was modified 4 months, 1 week ago by chillstarr.
Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.