Support » Fixing WordPress » Turning off "truncate_post"…

  • Hey,

    I’m fairly new to WordPress, so help with this issue is much appreciated.

    I’m using a theme which has a separate “blog template”. I’m using WordPress as a CMS, so I’m trying to base a whole website on it.

    The problem I have is that I can’t use the “More” tag the way I’d like to since the blog template is truncating my post to have 600 characters.

    <div class="blog-content-holder">
                        <div class="blog-post-text"><?php truncate_post(600); ?></div>
                        <a class="blog-cell_read_more" href="<?php the_permalink(); ?>">More</a>

    This code is in “_blog.php” – file and I can change the amount of characters here. I’d like to get rid of the blog automatically assigning the “More” tag after the truncation. I usually post photos, so I might not even have 600 characters in my posts.

    So what it comes down to is that I’d like to assign the placement of the “More” – tag myself.

    Thank you in advance.


Viewing 4 replies - 1 through 4 (of 4 total)
  • Christine Rondeau


    Volunteer Forum Moderator

    Try replacing <?php truncate_post(600); ?> with <?php the_content('Read more...'); ?>

    Thank you Christine for the advice. I changed that line, but it didn’t solve the issue quite yet.

    Now it shows the whole post and ignores the “more”-tags completely, but generates a “more”-link on the bottom of each post.

    I’ll try to resolve this issue on this end, but if someone knows an answer to this it would be appreciated greatly.


    Christine Rondeau


    Volunteer Forum Moderator

    If you’re site is online, maybe post a link to it, so we can see.. Perhaps something knows more about the theme you are using.

    Hey Christine,

    The site is not online quite yet, but I did manage to find a way around this problem.

    I suspect that there’s something higher up that negates the use of “the_content”, but what I did was to replace “truncate_post” with “the_excerpt” and then install a plugin called Advanced excerpt. That combination seems to work fine for me.

    I left the lower line of code alone so that the theme will still generate the “Read more” link in its own style and at the Advanced excerpt options I chose not to generate “Read more” links. I also set the Excerpt length at only one word, but checked the “Finish: sentence” so that I get one sentence excerpt no matter how short or long it might be.

    Even though this isn’t the solution I was originally looking for, I’ll mark this topic as resolved.

    For the record, the theme I’m using is “Widely” from Themes Kingdom, a free one too.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Turning off "truncate_post"…’ is closed to new replies.