Replace continue reading by another text


How to replace the continue reading text and remove the >>. Can remove it with beans_remove_output, but I have not understood very well if I can use Beans output filter.

Hey Alexandra,

Check this discussion regarding changing the text. When it comes the Icon, you can use Beans Markup API to remove as such:

beans_remove_markup( 'beans_next_icon[_more_link]' );

Hope that helps,

Instead of removing >> icon how would one go about modifying it to for instance .... ?

Hello Paal,

To replace the >> with a ..., you'd want to use this snippet of code:

beans_add_filter('beans_post_more_link_text_output', 'add_dots_after_continue_reading' );
 * Add ... after the "Continue reading" text.
 * @since 1.0.0
 * @param string $continue_reading_text
 * @return string
function add_dots_after_continue_reading($continue_reading_text) {
 return $continue_reading_text . '...';

The first part is _removing the icon HTML for the >> icon. Then you register a callback to the filter hook event 'beans_post_more_link_text_output'. That callback adds the textual string of ... to the end of the translated "Continue reading" and then returns it back to Beans for processing.

Here's a link to the Gist too.

I am once again refreshing my mind in relation to how things are put together! Writing down some good notes along the way. Thank you for your insight Tonya!

Write a reply

Login or register to write a reply, it's free!