Use this snippet to insert a button with a link to “Continue reading” or “Read more” below the extract on Genesis Sample archive pages.
Of all the ways to customize a Genesis template, we almost always focus on the aesthetic side only.
However, it is worth making small changes to the theme texts so that they too are in line with the brand.
Many of the Genesis child themes display a “Read more” or similar link after the excerpt on the archive pages; such as tags, category or blog.
But Genesis Sample is not one of them.
If you want to add this link to the post as a button so the reader just has to click on it, you can do it with a Genesis filter.
Code to insert a button with the link to read the full post
Add this snippet at the end of the functions.php file:
To see this and another 919 code snippets of this website, login or subscribe here.
With this code, you enter the text “Continue reading” inside the button.
Of course, you can modify it according to your needs.
To avoid the button being too close to the metadata or the next post, paste the following fragment in style.css:
.more-link.button {
margin-top: 30px;
}
Although this snippet is created for Genesis Sample, it should work in any Genesis child theme.
If you prefer, instead of placing a button, you can insert a simple text link next to the excerpt.
Conclusions
Now you know how to add a button that invites the user to read the full entry in Genesis Sample archive pages or any other Genesis child theme by code.
Any questions? Let me know in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉