Grow your CSS skills. Land your dream job.

WORDPRESS: Separate “Read More” from the_content ?

  • # June 7, 2013 at 1:53 am

    I’m basically trying to create two separate divs: one for the actual post content and another for the “Read More” Link.

    Right now the link just sits there right after the post text…I’d like to position it elsewhere

    I did some research and found [THIS](http://wordpress.org/support/topic/separate-read-more-from-php-the_content “http://wordpress.org/support/topic/separate-read-more-from-php-the_content”).

    “Mark / t31os” posted a couple comments with a solution. However, when I used the php he recommended it separated the “Read More” link from the rest of the post information, except now the post content is completely gone.

    What can I do to make the content reappear?

    Here is the code//

    < ?php if( strpos( $post->post_content , “” ) != false ) { ?>

    < ?php } ?>

    # June 7, 2013 at 2:25 am

    Found a solution!

    # June 7, 2013 at 2:27 am

    .

    # June 7, 2013 at 2:30 am

    Browsed through a couple extremely old themes I created, and found a snippet that does exactly what I was looking for.

    # June 7, 2013 at 2:32 am

    Filter//

    //READMORE
    add_filter( ‘the_content_more_link’, ‘custom_read_more_link’ );
    function custom_read_more_link() {
    return ‘

    ‘;
    }

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".