Read more code not work
-
I have used this code for read more but it does not work, someone can provide me the correct code
/*This Code is For Read More Fuction*/
function excerpt($num) {
$limit = $num+1;
$excerpt = explode(‘ ‘, get_the_excerpt(), $limit);
array_pop($excerpt);
$excerpt = implode(“,$excerpt).” ID) .” ‘ id='”.readmore.”‘>Read More;
echo $excerpt;
}
function wpse_filter_excerpt_length( $length ) {
if ( is_front_page() ) {
return 55; // change this to number of words you want on homepage.
} else {
return $length;
}
}
add_filter( ‘excerpt_length’, ‘wpse_filter_excerpt_length, 999 );
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Read more code not work’ is closed to new replies.