
Using the Genesis Theme Framework is a huge help when setting up, customizing and maintaining a WordPress powered website. But sometimes the default settings won't quite meet your requirements.
Recently while customizing a Genesis Child Theme for a client's website, in the theme settings I had set the Content Archives to Display post excerpts. But when viewing the post archives the excerpts did not have a “Read More” link like the client wanted.
I knew there was a quick way to make this happen in the Genesis WordPress Theme Framework and headed off to Google to make a quick search for the solution. In a matter of a couple of minutes I had the answer.
Below is the code I found and customized for my purposes. You'll need to be comfortable editing the functions.php file for the Genesis Child Theme you are using but it's pretty simple if you're careful.
// Add Read More Link to Excerpts
add_filter('excerpt_more', 'get_read_more_link'); add_filter( 'the_content_more_link', 'get_read_more_link' ); function get_read_more_link() { return '... <a href="' . get_permalink() . '">[Read More]</a>'; }
My thanks to WP Smith for sharing the original code.
I hope this helps you, but I'm also sharing this here so I can quickly find it the next time I need this tip myself.
Thanks for this, was exactly what I was looking for. Quick note though, you have an tag there at the end.
Gabriel, glad this helped you, and thanks for the heads up.
Thank you so much! This is the exact solution I was seeking. Saved me a ton of time.
Excellent! I used to do this with a much more complicated method that didn’t work great (I don’t even remember exactly what it was.) I was hoping to find a quick fix and this worked perfectly. Thanks for the post.
Andrew – so glad you found this helpful.
So clean, so easy…. it’s exactly what i was looking for.
Thanks from Spain 😉
You are welcome Omar – I’m glad this helped.
Thank you! Found two other suggestions that made no difference. This one worked quickly and easily.
ChristyK – super glad to hear this helped!
Great snippet, thanks for sharing! Can’t believe I didn’t already know how to do this. 🙂
Miranda – I’m glad this helped!
Crap, I tried it and broke it, lol! Any ideas?
Parse error: syntax error, unexpected $end in /home/content/54/9600754/html/braudcommunications/blog/wp-content/themes/agency/functions.php on line 108
Cecil – if you could share the contents of your functions.php file at http://pastebin.com/ or something I might be able to help. Otherwise I’m not sure.
Hi ! Thank you so much When I install child theme of genesis my site not ” read more ” . I have been worry about that . it was failure i think . But when I read your post . I have been success . Thank you so much one more .
To Phan – I’m glad this helped. You are welcome.
Thanks for offering. I actually went in via ftp and took it out. Is there a certain place in the file that I need to put it?
Cecil – this WordPress.org forum post will probably help you edit the funtions.php file. http://wordpress.org/support/topic/how-to-add-codes-in-functionphp
I added the code and have had no success. Any suggestions? I’m using the Epik child theme
Sorry Aaron but I’m not sure how to help without more information.
Thank you so much.
Tried the code snippets in Studiopress’s own website with no luck.
Your one worked perfectly 🙂
Thanks for sharing.
Ok so it’s working when I don’t manually set a “MORE” tag in my post.
But when I set a more tag it doesn’t show the READ MORE link like it’s supposed to.
Seems “add_filter( ‘the_content_more_link’, ‘get_read_more_link’ );” is not doing anything in my case.
Any ideas?
Thanks
Ari – I’m sorry but I’m not sure what’s going on with your “more” tag.
This is great and it has helped me out.
I would like to automatically display a link from the excerpt to its post even if post has an excerpt but the excerpt is shorter than the specified cut-off length for archives.
In other words, when the full excerpt is displayed and there is no “more” to be read (of the excerpt, that is.)
Reason is that some people don’t know that you can usually click the title of the post in the
archives.
Steve – this might be of help to you: Force a Read More Link on all Post Excerpts in WordPress
Big thanks… i was looking for exactly this… having that read more link is really important! i really appreciate and it has helped me greatly… keep up with the good work…
Works perfectly! Not sure why the function is missing from the core theme, but much thanks for posting this!
Do I copy the numbers you have on the far left also? Or just what appears to be the code without the numbers?
I added the code without the numbers.
I didn’t break the site but it didn’t work either. I see no difference. Am I meant to now manually insert more tags each time or?
Hey it worked! The only one not working is actually the one I added the more tag too. Cheers!
Hey if I was to change Read More to Continue Reading would it say continue reading or break it?
Matthew – you can change that text to whatever you like.
Stupid question: Do we have to input our unique site URL where you’ve typed <a href="' or do we leave exactly as is? Thank you!
Carrie – use the code just like it is. No need to use your url – the code and WordPress handle that.
Just used it to add to archive page. Worked perfectly. Thanks!!
Hi Melissa – glad to hear that. You’re welcome!
Thanks! It worked perfectly!
in which file we have to add the code
rAVi – the functions.php file
Thanks for that, it worked!
Great! Glad this helped.
Hello, Thank you. It was exactly what I needed
Great – glad to hear it.
Thanks
Thank you very much, Exactly what I am looking for my genesis theme.
Works like a charm and doesn’t cost an arm! Thanks for this information!
Just used it, and poof, changed everything…I was always thinking, I’ll get to that one day, well today was the day..
Thanks!
Carlos
Worked like a charm, thank you so much for sharing!! It’s a beautiful thing 😉
Thank you so much it’s working on my blog this was cooooooooooool tricks.
wooohoo! worked for my Genesis theme thanks buddy
Thanks, Worked for my genesis child theme
This is very helpful. I have been researching on how to do this in my blog. The code works… Thanks for sharing.
Worked brilliantly for the Metro Pro theme! Thank you so much Kevin for sharing! 🙂
Thanks for sharing this, it’s very helpful I must confess
I have used my genesis theme for a long time without the read more link. thanks for sharing this with us.
Many thanks! Was looking for this for a while
Thanks Kevin, it worked for me
Great.. I have been researching on how to do this in my blog. The code works… Thanks for sharing.
Wow. It worked. I was able to add it to my theme. Thanks a lot.
yeahhhhhhh Thank you so much it’s working on my blog this helpful for genesis user
Thank you so much.
Tried the code snippets in Studiopress’s own website with no luck.
Your one worked perfectly 🙂
Thanks for sharing.
Thanks a lot. It’s so much helpful. I just move to Genesis 🙂