Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #643046

    Stefan
    Participant

    Hi! I’m struggling forever with the recent post element for a website I’m buidling. To cut a long story short:

    a) It would be AWESOME to have an excerpt feature for recent posts in Cornerstone! I’ve seen other people request it, and I’d like to second that request.

    b) I have managed to custom tweak it to almost where I want it. There’s one last thing though: The “read more” is part of the excerpt text. Is there a way to just remove it and replace it with a “…”?

    Thanks in advance!

    #643047

    Stefan
    Participant
    This reply has been marked as private.
    #643155

    Thai
    Moderator

    Hi Stefan,

    a) It would be AWESOME to have an excerpt feature for recent posts in Cornerstone! I’ve seen other people request it, and I’d like to second that request.

    We certainly appreciate the feedback! This is something we can add to our list of feature requests. This way it can be taken into consideration for future development. All of these items are discussed with our team internally and prioritized based on the amount of interest a particular feature might receive. Thanks!

    I’ve already seen the ‘…’ in your blog’s excerpt(http://i.imgur.com/Gem5Gjv.png), to remove the read more link, try adding following CSS under Customize > Custom > CSS:

    .blog .more-link {
        display: none;
    }

    Hope it helps 🙂

    #643176

    Stefan
    Participant

    Hi! Thanks for your reply, but that is not what I am talking about! I mean the recent post element that I have added to the main page: http://i.imgur.com/ZvZMSgt.jpg

    To show the excerpt, I had to do some Voodoo in functions.php. Then it displayed the whole excerpt text as a link. I then changed the font color to make it look like normal text. The problem is that the “read more” is part of the text and not a separate link which class I could edit or something. (See here: http://i.imgur.com/fMBH37T.jpg).

    So the “read more” is generated somewhere and pasted at the end. I need to know where, or a way to supress it somehow.

    #643365

    Thai
    Moderator

    Hi There,

    Sorry for the confusion!

    To remove the ‘Read More’ text, please add the following code under functions.php file in child theme:

    function x_custom_excerpt_more( $excerpt ) {
    	if( !is_home() ){
    		return str_replace( 'Read More', '', $excerpt );
    	} else {
    		return $excerpt;
    	}
    }
    add_filter( 'wp_trim_excerpt', 'x_custom_excerpt_more' );

    Hope it helps 🙂

    #643684

    Stefan
    Participant

    That worked perfectly! Thank you very much! You guys rock!

    #643977

    Lely
    Moderator

    You’re welcome Stefan!

    Always,
    X