Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of the fpw_read_more_text filter in Feature a Page Widget 2.0. The widget uses an accessible "read more" link that says in full "Read More about {Page Title}..." to screen readers, search engines, etc. but only appears as "Read More..." The filter only modifies the visible portion of the link.
<?php
/**
* modify the "Read More" text in the accessible "Read More" link
*
* example: change it to "Continue Reading"
*
* @param $read_more_text string The "________" in "________ about {Page Title}"
*/
function fpw_change_read_more( $read_more_text ) {
$read_more_text = __( 'Continue Reading', 'your-text-domain' );
return $read_more_text;
}
add_filter( 'fpw_read_more_text', 'fpw_change_read_more' );
@Georyudo

This comment has been minimized.

Copy link

@Georyudo Georyudo commented Jun 14, 2016

Hi,

I found your plugin and I really like it! But I need to change the Read More text but somehow I can't figure out how to.

I added your above snippet to my functions.php file but I don't know what you mean with "your-text-domain". Do I change this string with my website domain?

Best Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment