Adding 'read more' to excerpts

Hello,
I added the following to my functions.php file to add ‘Read more’ after post excerpts:

// Changing excerpt more
   function new_excerpt_more($more) {
   global $post;
   return '… <a href="'. get_permalink($post->ID) . '">' . 'Read More &raquo;' . '</a>';
   }
   add_filter('excerpt_more', 'new_excerpt_more');

But am having 2 issues. First it only displays on one post on a page that lists 5… as you can see in the image attached its on one and not the other. And the other issue is that it displays weird question marks next to it, which you can also see in the image.

Do i have the code wrong?
TIA!
Rena

Hi Rena,

Thanks for reaching out.

Excerpt more is usually displayed to excerpt generated by Wordpress, excerpt that is added manually usually doesn’t have that. I recommend checking this article https://wpmayor.com/add-read-link-manual-excerpts/.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.