Read More NOT showing in ALL entry summaries

Viewing 14 posts - 1 through 14 (of 14 total)
  • #17607
    m0nini873
    Participant

    Hey there,

    I’ve been using Esplanade (btw, awesome!) for a few months now, and just got around to editing the functions so that it displays a “read more” link at the end of each entry-summary. (I do not manually set up an excerpt, I let it truncate the content automatically – if that matters.)

    It seems to work great, except that it’s only working for the four most recent excerpts on the homepage, and not the older entry summaries (there are four older ones). I’m really not sure why. Any direction would be much appreciated! πŸ™‚

    #17608
    m0nini873
    Participant

    Oops, here’s a link: http://www.enifex.com

    #17632
    Daniel Tara
    Keymaster

    Can you please post the piece of code you have modified?

    #19008
    noaneo
    Participant

    Hi,

    Miss not having at the end of the excerpts read more
    How can add it?
    on the image, we see that the theme does not have this function, damage,
    read more
    May be the first update of the theme, to rectify this oversight.
    Otherwise awesome this theme, full of options!

    Thank you

    #19014
    Daniel Tara
    Keymaster

    Here’s a simple code snippet to add read more links to excerpts:

    add_filter( 'the_excerpt', 'esplanade_excerpt_read_more', 30 );
    
    function esplanade_excerpt_read_more( $excerpt ) {
    	$excerpt .= sprintf( '<a href="%s">Read More &rarr;</a>', get_permalink() );
    	return $excerpt;
    }
    • This reply was modified 10 years, 1 month ago by Daniel Tara.
    #19016
    noaneo
    Participant

    Hi,
    thank you
    in the child theme ?
    why pinboard ? And not Esplanade ?

    #19018
    Daniel Tara
    Keymaster

    I’m sorry, prefix habbit πŸ™‚ I have updated the code prefix to match the esplanade prefix, the code as is applies for any theme though. Yes, it goes in your child theme’s functions.php file.

    #19019
    noaneo
    Participant

    thanks I thought so, I made the change.

    -the feature will be added to the next update of the theme?

    -Last question, why Read More appears not homepage for 4 posts?
    esplanade  four posts without read more

    thank you

    • This reply was modified 10 years, 1 month ago by noaneo.
    #19023
    Daniel Tara
    Keymaster

    No, this feature will not be added to the theme.

    Are you using any post formats for those posts? Did you use the priority specified in the code?

    #19026
    noaneo
    Participant

    Good evening

    you will maintain this theme? Do not stop it!

    I have not touched the code, the theme files are original, and I added the code as you gave it higher.
    The posts have only the normal format
    I put in the Grid options, 2 that’s all.
    I just put on 3 columns, the layout is the same as your demo for the homepage
    http://demo.onedesigns.com/Esplanade/

    Thank You

    #19032
    Daniel Tara
    Keymaster

    The Esplanade theme will not be discontinued. A permalink to excerpts will not be added by default because this is more a code hack than a feature.

    Can you please post a direct link to your website?

    #19034
    noaneo
    Participant

    Hello

    This is not my site but the site of an association to be precise.
    http://arnouvilleetsonpasse.fr/

    #19052
    Daniel Tara
    Keymaster

    Try increasing the priority for the function above. e.g. from 30 to 999 or some other high number.

    #19055
    noaneo
    Participant

    hi,

    add_filter( 'the_excerpt', 'esplanade_excerpt_read_more', 999 );
     
    function esplanade_excerpt_read_more( $excerpt ) {
        $excerpt .= sprintf( '<a href="%s">Read More &rarr;</a>', get_permalink() );
        return $excerpt;
    }

    or

    add_filter( 'the_excerpt', 'esplanade_excerpt_read_more', 70 );
     
    function esplanade_excerpt_read_more( $excerpt ) {
        $excerpt .= sprintf( '<a href="%s">Read More &rarr;</a>', get_permalink() );
        return $excerpt;
    }

    same, no change

    thank you

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.