In my blog I want to put a label "Read More" and after clicking it, I want all my posts to appear but it's not working. Here is my code to try to be more specific:
add_filter('the_excerpt','openstrap_excerpt');
function openstrap_excerpt(){
global $post;
$link='<span class="readmore"><a href="'.get_permalink().'" > Continue reading →</a></span>';
$excerpt=get_the_excerpt();
if ( preg_match('/<!--more(.*?)?-->/', $post->post_content) ) {
echo $excerpt.$link;
} else {
echo $excerpt;
}
}
function openstrap_excerpt_read_more($text) {
return ' <span><a href="'.get_permalink().'" class="readmore">Continue reading →</a></span>';
}
add_filter('excerpt_more', 'openstrap_excerpt_read_more');
function openstrap_custom_excerpt_length($length) {
return 85;
}
add_filter('excerpt_length', 'openstrap_custom_excerpt_length');