Site logo

[Support request] Remove Read More button on home page only

Home Forums Support [Support request] Remove Read More button on home page only

Home Forums Support Remove Read More button on home page only

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1886613
    Michael

    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?

    #1886671
    Ying
    Staff
    Customer Support

    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 🙂

    #1889958
    Michael

    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!

    #1889972
    Ying
    Staff
    Customer Support

    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 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.