how to change the 'read more' text across all pages in wordpress

Go To StackoverFlow.com

0

In wordpress, I have the loop.php file. There I can see the 'read more' code. I changed it and it does take effect on the index page. But then If I go on the tags pages ../?tag=reference I get the old 'continue reading' text and not the edited text of 'read more' from the loop.php

This is what I have on the loop.php

<div class="entry-content">
<?php the_content( __( '<span class="read_more">Read More</span>', 'boilerplate' ) ); ?>
</div><!-- .entry-content -->

And this is what I am using on tag.php

get_template_part( 'loop', 'tag' );

But as I said instead of getting the 'read more' (as I get on the index page) I sut get 'continue reading'

I have looked in the general-template.php and functions.php and there's nothing that suggests it related to the read more code. and everything I have research on google simply points in editing the loop.php file or to mage a new loop-tag.php file. Which I did but the result I the same: instead of geting 'read more' I get 'continue reading'

Thanks for your help

2012-04-04 23:56
by aurel


0

It really depends on your theme and how the loop.php was implemented into each theme file.

But see http://codex.wordpress.org/Customizing_the_Read_More for more help.

According to http://wordpress.org/support/topic/theme-boilerplate-excerpt-more-link-customization?replies=3 :

function volta_setup() {
    remove_filter( 'get_the_excerpt', 'boilerplate_custom_excerpt_more' );
    remove_filter( 'excerpt_more', 'boilerplate_auto_excerpt_more' );
}

add_action('after_setup_theme', 'volta_setup');
2012-04-05 01:55
by markratledge
it's the boilerplate them - aurel 2012-04-05 02:15


0

I've fought with this confusing behavior before. Wordpress treats excerpts differently when you use the <!--more--> tag versus using the Excerpt field when editing a post.

the_content() will only include use the "Read more" text in your example if it detects a <!--more--> tag.

Check out the Codex for more details. http://codex.wordpress.org/Customizing_the_Read_More

Edit: Whoops, @markratledge already pointed you in the right direction.

2012-04-06 01:11
by Preston


0

This might not be the best practice but in my case it solved the problem...

<script>
jQuery( document ).ready(function() {
jQuery(".read_more").text("Change me");
});
</script>

Source - based on the DIVI theme's read more button

2017-04-20 10:12
by 78juli
Ads