Tagged: x
-
AuthorPosts
-
November 16, 2016 at 1:18 pm #1259752
yhshin1020ParticipantHey,
I am trying to add a “read more” link after the excerpt on my blog entry feature.
I’ve gotten an answer from other threads (including my own a few months ago) but none of the codes worked.
How can I add this successfully?
Thanks.
November 16, 2016 at 1:19 pm #1259753
yhshin1020ParticipantThis reply has been marked as private.November 16, 2016 at 3:35 pm #1259941
Nabeel AModeratorHi There,
Thank you for writing in! Please add the following code in your child theme’s functions.php file:
// Adding Excerpt to Posts function excerpt_read_more_link($output) { global $post; return $output . '<a href="'. get_permalink($post->ID) . '"> Read More</a>'; } add_filter('the_excerpt', 'excerpt_read_more_link');Let us know how this goes!
November 16, 2016 at 8:14 pm #1260417
yhshin1020ParticipantThis reply has been marked as private.November 16, 2016 at 11:37 pm #1260562
DarshanaModeratorHi there,
#1. Use the following CSS rule instead.
.blog .entry-content > p::after { content: " ..."; }#2. Then update the following code in your functions.php file.
// Adding Excerpt to Posts function excerpt_read_more_link($output) { global $post; return $output . '<a class="my-readmore-link" href="'. get_permalink($post->ID) . '"> Read More</a>'; } add_filter('the_excerpt', 'excerpt_read_more_link');Then add the following custom CSS rule to change the color of your read more link.
.my-readmore-link { color: red; }Hope that helps.
November 17, 2016 at 12:51 am #1260617
yhshin1020ParticipantYou’re the best.
Thanks
November 17, 2016 at 12:57 am #1260625
FriechModeratorWe’re delighted to assist you with this, should you require any further assistance with X|THEME and Cornerstone, please feel free to get in touch with us.
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1259752 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
