Site logo

Archived topic

Remove Read More button on home page only

3 replies · Started by Michael on August 6, 2021

Viewing posts 1–4 of 4

I turned on the "Read More" button for blog posts in the customizer, because I like it elsewhere on the site (namely on the blog page). But, I'd like it if the "read more" were text only on the home page in the "recent posts" widget you see on the home page at the top.

Any tips to make this happen?

Hi Michael,

Try this CSS:

.home .wp-block-latest-posts .read-more.button {
    color: #1e73be;
    background-color: unset;
    padding-left: 0;
}
.home .wp-block-latest-posts .read-more.button:hover {
    color: #000000;
}

If you want the ... after Read more, add this CSS as well:

.home .wp-block-latest-posts .read-more.button:after {
    content:"...";
}

Let me know :)

That worked perfectly on the 2 posts that don't have an excerpt. Is there a way to get the "Read more" even if I have the excerpt set up?

THANK YOU!

That worked perfectly on the 2 posts that don’t have an excerpt. Is there a way to get the “Read more” even if I have the excerpt set up?

I'm not sure I fully understand your question.

Do you mean using a custom excerpt by saying have the excerpt set up?

If so, you can give this a PHP snippet a try to activate the read more button (not sure if it will work with the wp latest posts block though):
https://docs.generatepress.com/article/activating-read-custom-excerpt/

Adding PHP: https://docs.generatepress.com/article/adding-php/

Let me know :)

This archived topic is closed to new replies.