Redirect 'read more' to specific page instead of archive
-
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
- The topic ‘Redirect 'read more' to specific page instead of archive’ is closed to new replies.