WordPress.org

Forums

[resolved] the_content() and more tag (5 posts)

  1. seedpxwee5
    Member
    Posted 6 years ago #

    I'm currently using
    <div class="entry"><?php the_content('<br />Continue Reading &raquo; ' . get_the_title('', '', false)); ?>

    To display my main content.
    The content will show up like

    This is a part of the more content
    Continue Reading >> TITLE of the post

    What should I do if I want to add [...] behind the content? To make it

    This is a part of the more content [...]
    Continue Reading >> TITLE of the post

    I tried
    <div class="entry"><?php the_content('[...]<br />Continue Reading &raquo; ' . get_the_title('', '', false)); ?>

    It doesnt work because the dots are linked as well. I want the dots not linked to anywhere.

  2. geoff67
    Member
    Posted 6 years ago #

    I tried this but it's still a part of the link.
    <div class="entry"><?php the_content('<span class="more"><br />Continue Reading &raquo;</span> ' . get_the_title('', '', false)); ?>

    In style.css:
    .more{content:'\5B...\5D';}

    So I'm guessing the only way is to type the [...] just before you insert <!--more--> in your post.

  3. geoff67
    Member
    Posted 6 years ago #

    Correction:
    .more:before{content:'\5B...\5D';}

  4. seedpxwee5
    Member
    Posted 6 years ago #

    NVM got it ...
    Edit the post_template at wp_includes

    find
    $output .= $teaser

    Change to
    $output .= $teaser . '[...]';

  5. geoff67
    Member
    Posted 6 years ago #

    Well, remember to change that every time you upgrade WordPress.

Topic Closed

This topic has been closed to new replies.

About this Topic