• Resolved markjones28

    (@markjones28)


    Hi,

    I have some testimonials from customers which are just short quotes and I want to show them as excerpts without a “Read More” link (because there is nothing more to read).

    Is it possible to remove the link from specific/individual testimonials? I have full case studies for others so want to keep the “Read More” link for those.

    Thanks,

    Mark

Viewing 5 replies - 1 through 5 (of 5 total)
  • anonymized-13171256

    (@anonymized-13171256)

    Hi Mark,

    Unfortunately, there is no mechanism for specifying use of the excerpt or the full content for individual testimonials.

    Try this. In the view editor, select the manual excerpt option. If the testimonial has no manual excerpt, it will create one based on the length you set and add the “Read more”. That requires your short quotes to always be less than X words and your case studies always longer than X words.

    https://www.screencast.com/t/cIc7Y44m4nb

    https://www.screencast.com/t/i4rgAmrKvRWp

    If that doesn’t work in your situation, I may be able to provide more control with a custom filter. Let me know if you are open to that.

    Thread Starter markjones28

    (@markjones28)

    Hi Chris,

    Thanks for getting back to me and for the workaround but it didn’t quite solve the issue.

    I tried another way – in the “Read more” link section of Views, I selected “for both automatic and manual excerpts”. Then I went back to the testimonial which only had a few lines in it and put it in the Content section, leaving the Excerpt section blank. This has done the trick as there is no “Read more” link on the testimonials page.

    One other questions; is there any way to move the “Read More” link to the next line of the testimonial? Sometimes in stays in-line with the quote.

    Thanks!

    Mark

    anonymized-13171256

    (@anonymized-13171256)

    Glad to hear you found the right combination of settings.

    Add this to the end of your theme’s functions.php file. It will prepend the read-more with a line break.

    /**
     * Add a line break before the "Read more" link.
     */
    function my_testimonial_read_more_link( $link ) {
        return '<br/>' . $link;
    }
    add_filter( 'wpmtst_read_more_page_link', 'my_testimonial_read_more_link' );
    
    Thread Starter markjones28

    (@markjones28)

    Hi Chris,

    Thanks for that but the code seems to be throwing a syntax error. Can you please check it?

    Best,

    Mark

    Thread Starter markjones28

    (@markjones28)

    Apologies Chris – working fine now!

    Thanks,

    Mark

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Remove “Read More” Link’ is closed to new replies.