Support » Fixing WordPress » Only include "Read More" on long posts

  • Hello,
    I have been trying for a while to figure out how to edit my theme so that the “Read More” function is only used when I choose to add the tag in a post. As of right now, I think it’s hard-coded into the theme and appears on every post regardless of how long or short, and it doesn’t require adding the “More” tag into a post for it to appear.

    I’m using the Blogum theme (, and the URL I’m using it at is

    Any help figuring this out would be appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Michael


    Forum Moderator

    try to edit loop.php;

    <a href="<?php the_permalink() ?>#more" class="more">Read More</a>

    change this to:

    <?php if( strpos($post->post_content,'<!--more-->') >= 1) : ?>
                    <a href="<?php the_permalink() ?>#more" class="more">Read More</a>
    <?php endif; ?>

    the ‘read more’ should then only be shown on post where you have used the ‘more tag’.

    Thanks, I will give that a try.

    Thanks Alchymyth, that worked perfectly!

    @giantchild Nice blog! how did you managed to put the search field with black background?!

    Hey @urbanizing,

    I just changed the color in the stylesheet, look for that line and change the background hex “background: #000;). This line of code is pretty close to the top of your stylesheet.

    .search {width: 225px; float: right; position: relative; top: -42px; background: #000;}

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Only include "Read More" on long posts’ is closed to new replies.