How to modify continue reading link?

59 Views Asked by At

If you you DOM to show your RSS in your HTML you will find the in the end of the content "Continue reading" and with the permalink(). You can check my feed here

This is the script before end of tag

 <p class="link-more"><a href="https://www.eitren.com/blog/products/bagaimana-cara-page-halaman-link-website-di-halaman-pertama-google-search-engine/" class="more-link">Continue reading<span class="screen-reader-text"> "Bagaimana cara page/halaman/link website di halaman pertama Google Search Engine?"</span></a></p>]]></description>

I would like to modify the link add /AMP/ at the end of link. So it would become "...google-search-engine/amp/" class...

1

There are 1 best solutions below

0
WebElaine On

It depends on what specifically your RSS feeds are set to display. Some show full posts, others excerpts. It looks like in your case you can filter this text with the the_content_more_link hook.

function wpse_send_to_amp() { return 'Continue reading'; } add_filter( 'the_content_more_link', 'wpse_send_to_amp' );