php syntax slightly wrong. adding read more with title to auto excerpt
-
I just can’t seem to get this line right. I think I am awfully close. My code editor tells me I have a syntax error.
return <a 'href="'. get_permalink($post->ID) . '">' . 'Continue Reading:'. get_the_title() . '</a>');
Just in case here is the whole function. It works fine without my attempt to add the post title after Continue Reading.
function new_excerpt_more($more) { global $post; return <a 'href="'. get_permalink($post->ID) . '">' . 'Continue Reading:'. get_the_title($post->ID) . '</a>'; } add_filter('excerpt_more', 'new_excerpt_more');
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘php syntax slightly wrong. adding read more with title to auto excerpt’ is closed to new replies.