Moving Excerpt read_more Link To New Line?

Community Forums Forums Design Tips and Tricks Moving Excerpt read_more Link To New Line?

This topic is: resolved

This topic contains 4 replies, has 2 voices, and was last updated by  braddalton 1 year, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #38204

    dave_s
    Participant
    Post count: 26

    Been trying to figure this out all morning. I’m either dumb or there’s some secret Masonic process to achieving it :)

    I have posts showing as excerpts (set in Agency theme settings) and I would like to have a Read More link.

    Using the code snippet in the resources section I can get the link to show, but it’s inline with the excerpt text. What I want is to have it show on a new line.

    The same as Sugarrae has on her site

    Cheers

    Dave

    #38226

    braddalton
    Participant
    Post count: 9722

    Have you added the WordPress read more link manually to your posts or are you using the Genesis ? Theme Settings > Content Archives settings? http://my.studiopress.com/snippets/post-excerpts/

    Sugar Rae may have added the read more link manually.

    If they’re excerpts, then this is the code to use which you can also target with CSS.
    [php]
    /** Modify the Genesis content limit read more link */
    add_filter( ‘get_the_content_more_link’, ‘custom_read_more_link’ );
    function custom_read_more_link() {
    return ‘… <a class="more-link" href="’ . get_permalink() . ‘">[Continue Reading]</a>’;
    }
    [/php]

    Add this CSS code to the end of your child themes style.css file. It will display the link on a new line.
    [css][/css]
    a.more-link {
    display: block;
    margin-top: 1.25em;
    width: 30%;
    }
    [/css[

    Not sure how she got the arrow because it doesn’t paste into a PHP function but i’ll find out.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #38228

    braddalton
    Participant
    Post count: 9722

    [css]
    a.more-link {
    display: block;
    margin-top: 1.25em;
    width: 30%;
    }
    [/css]


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #38262

    dave_s
    Participant
    Post count: 26

    Thanks Brad, you’re a star.

    That worked a treat.

    Added a bit of bottom padding and increased the width slightly and it now looks the dogs nadges ( not sure if that translates well, but rest assured it’s a good thing :) )

    As for the arrow, it copied fine into the functions file.

    Thanks a lot Brad, appreciate your help.

    Dave

    #38345

    braddalton
    Participant
    Post count: 9722

    hahaha! Good stuff Dave.

    I’m working on writing a post about how to add a nice button to that tag also. Cheers


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

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

The topic ‘Moving Excerpt read_more Link To New Line?’ is closed to new replies.