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
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');
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.
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