• Hi. first I followed the instructions in this thread to add a ‘read more’ link to the excerpts in the rotator in the sidebar.

    Now I am trying to figure out how to change the code added to functions.php so the ‘read more’ link leads to a designated testimonials page on the site instead of the archives.

    The site is currently under development in WordPress’ stealth mode, so giving the url wouldn’t solve anything. And, yes, this is a child theme, so that is not an issue.

    Per the instructions on the above link, this is the code I need to modify:

    function hg_testimonial_rotator_the_excerpt( $html, $limit )
    {
    	$more_text = '... <a class="read-more" href="'.get_permalink(get_the_ID()).'">Read Full...</a>';
    	return wp_trim_words(get_the_excerpt(), $limit, $more_text);
    }
    add_filter('testimonial_rotator_the_excerpt', 'hg_testimonial_rotator_the_excerpt', 10, 2);

    Any assistance with this would be appreciated. I can edit code, but I am not a developer and this is beyond me.
    Thank you

    https://www.ads-software.com/plugins/testimonial-rotator/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Hal Gatewood

    (@halgatewood)

    I just added two new settings in version 2.2: Show Link and Link Text.

    Show Link will make the link appear. And Link Text allows you to change the link text to whatever you want.

    These are new options in the Widget Settings and also available as shortcode attributes:

    show="1" and link_text="View Testimonial"

    Thread Starter catwingz

    (@catwingz)

    Hi, This is great news… except I updated to version 2.2 and don’t see these settings in the widget. What am I missing?

    John McCarthy

    (@john-lion)

    I was also not seeing the settings. Whilst they are not in the main settings for all rotators (for me at least on version 2.2.3), if you click on “Override Rotator Settings?” in the rotator widget the new settings will appear.

    It’d be great to see these settings in the main settings as currently these settings can only be used in a widget and very often I add a rotator via template call.

    Cheers

    Thread Starter catwingz

    (@catwingz)

    @john McCarthy, thanks for the head’s up. That does open up a whole new world of possibilities. Unfortunately, the ability to direct the ‘read more’ links to a designated Testimonial page is not included in this functionality. The ‘show link’ and ‘link text’ features mentioned do not address this issue.

    Thanks again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Redirect 'read more' to specific page instead of archive’ is closed to new replies.