Community Forums › Forums › Archived Forums › Design Tips and Tricks › How can I add the "Read More" link to excerpts?
Tagged: excerpts, Sample Theme
- This topic has 9 replies, 6 voices, and was last updated 9 years, 7 months ago by
handsun.
-
AuthorPosts
-
July 6, 2013 at 11:38 am #49544
henridelbosque
MemberHello people. I am working with the sample child theme but i have a question. I am using excerpts but i want to add a "read more" link at the end of it. Is there a way to do it?
Here is my sitie: http://www.tuvitalidad.com
July 6, 2013 at 1:45 pm #49548RobG
MemberHave you try inserting it using your WordPress editor...
To speed up the process please post the link to the website in question.
We recommend using Firebug to view source codes http://getfirebug.com/
RobGoss WordPress Developer
We build WordPress websites for your business or personal goals
http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgossJuly 6, 2013 at 3:19 pm #49555henridelbosque
MemberSorry if I didnt make it clear. What i need is to add a read more link at the end of every excerpt automatically without using the 'more tag' in the posts editor.
July 6, 2013 at 11:20 pm #49602Summer
MemberThere is a tutorial at Studiograsshopper that's come in handy for me when tweaking the excerpt (I prefer to use the manual excerpts, and have on occasion needed to add a "Read More")
http://www.studiograsshopper.ch/code-snippets/customising-the_excerpt/
WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
Slice of SciFi | Writers, After DarkJuly 6, 2013 at 11:53 pm #49603Brad Dalton
ParticipantPretty much exactly the same as what you'll find in the official StudioPress Code Snippets. http://my.studiopress.com/snippets/post-excerpts/
https://gist.github.com/studiopress/5700336
July 7, 2013 at 9:28 am #49634henridelbosque
MemberWorked as Summer said. Thank you very much 🙂
July 7, 2013 at 11:16 am #49652Summer
MemberBrad, the Studio Press page never included any snippets that worked with manual excerpts, and the tutorial at Studiograsshopper was one of the few resources to highlight the distinction between automatic and manual excerpts early on, and to write snippets that would work for either method.
Plus, there's no confusion about "will that only work with Genesis themes" for newcomers.
I love Studio Press resources as much as anyone else here, but sometimes there's a tunnel vision towards solutions that rivals the old Steve jobs Reality Distortion field 🙂
WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
Slice of SciFi | Writers, After DarkNovember 14, 2014 at 8:36 pm #131580colleengreene
MemberThank you, Summer! I've been searching for a solution for hours. The other tutorials all recommend a code block that was not working on the Sample child theme. This worked perfect. And you are correct....the StudioPress code snippets do NOT do the same thing, and do not work for manual excerpts (at least not on the Sample child theme).
November 15, 2014 at 10:02 am #131608Brad Dalton
ParticipantFor hand crafted excerpts added manually in the Excerpt meta box, here's another solution
July 9, 2015 at 8:36 am #158898handsun
ParticipantI added both these snippets to functions.php (Whitespace Pro) but got nothing back, no read more and no 50 words, any ideas?
I also tried this which I found on wordpress.org https://codex.wordpress.org/Excerptfunction new_excerpt_more( $more ) { return ' <a class="read-more" href="'. get_permalink( get_the_ID() ) . '">' . __('Read More', 'your-text-domain') . '</a>'; }
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.