WordPress.org

Ready to get started?Download WordPress

Forums

Esplanade
Add Read more (10 posts)

  1. lumut
    Member
    Posted 1 year ago #

    How to add the Read more at the end of post (at homepage)?

  2. tomeh
    Member
    Posted 1 year ago #

    I join with the request to make a "read more"

  3. jhulstedt
    Member
    Posted 11 months ago #

    Here is what I did to fix this,
    Found this in content.php file in the root of esplanade folder:

    <div class="entry-summary">
    	<?php the_excerpt(); ?>
    </div><!-- .entry-summary -->

    Replace with this:

    <div class="entry-summary">
    	<?php the_excerpt(); ?><a>" rel="bookmark" title="<?php the_title_attribute(); ?>">Read More</a>
    </div><!-- .entry-summary -->

    Of course you know the problems of changing the code that comes with the next update. You get to do it again!

  4. CrouchingBruin
    Member
    Posted 10 months ago #

    Of course you know the problems of changing the code that comes with the next update. You get to do it again!

    For that reason, you should create a child theme instead of modifying the theme files directly. It doesn't take that much work; besides creating a new style.css file (which can be virtually empty, since you'll be bringing in the CSS from the parent theme), you only need to copy over any modules that you've changed (e.g., content.php).

  5. jenskoegler
    Member
    Posted 5 months ago #

    The replacement php lines don't seem to work with my Esplanade theme.

    Some of the script text shows up where just the "Read More" should show up. It basically looks like this (with the post's headline/title for the_title_attribute):

    " rel="bookmark" title="the_title_attribute">Read More

    The text has the colour of a link and it also changes its colour when you move your mouse arrow over it. But it's no working link and you can't click on it to get to the full post.

    I've changed it back. Could anybody here provide a working solution? It would be much appreciated.

    Regards,
    Jay

    http://weblog.jay-kays.de

  6. stephencottontail
    Member
    Posted 5 months ago #

    There was a typo in the code. It should look like this:

    <?php the_excerpt(); ?><a rel="bookmark" title="<?php the_title_attribute(); ?>">Read More</a>

    And as @CrouchingBruin already explained, you should make this change in a child theme.

  7. jenskoegler
    Member
    Posted 5 months ago #

    Thanks a lot for your help. :-)
    I will try it tomorrow. Need some sleep first.

  8. jenskoegler
    Member
    Posted 5 months ago #

    The Read More shows up all tight now but it's still not working.
    The Read More has the colour of a link and it also changes its colour when you move your mouse arrow over it. But it's no working link and you can't click on it to get to the full post. It's a "fake link". Just colored text and nothing more.

  9. stephencottontail
    Member
    Posted 5 months ago #

    Yes, that makes perfect sense, because I forgot an important part. It should work if you add href="<?php the_permalink(); ?>" to the <a> tag.

  10. jenskoegler
    Member
    Posted 5 months ago #

    Thanks a lot for your help. It's working now.
    I already thought that a href was missing somewhere because I know some HTML. I'm just don't know enough about php and its syntax. I'm only at the beginning doing experiments. :)

    Thanks again for your help.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags