Using more tag instead the 'truncate_post' function

  • Author
  • #1036978


    I have a problem. I’m trying to make a loop without the function “truncate_post”, instead of this I want to use the function “the_content()” with the <–!more–> tag. I need help, please!

    Here we have the code from Widely theme:

    //The Loop
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    $data = get_post_meta( $post->ID, GD_THEME, true );
    $title = the_title('','',FALSE);
    $title = strtoupper($title);
    if ($title<>substr($title,0,165)) {
    $dots = "...";
    }else {
    $dots = "";

    <div class="blog-one-post">
    <?php $imagedata = simplexml_load_string(get_the_post_thumbnail()); ?>
    $comments = get_comments("post_id=$post->ID");
    $num_of_comments = 0;
    foreach((get_the_category()) as $category) {
    $post_category = $category->cat_name;
    $post_category_id = $category->cat_ID;

    foreach($comments as $comm) :
    $written = $post->post_author;
    $user = get_user_by('id',$written);
    $written = $user->nickname;

    <div class="blog-post-title">"><?php $title()); ?></div>

    <?php if (has_post_thumbnail()) { ?>
    <div class="blog-page-image-holder">
    <div class="blog-page-image-center">
    <span class="blog-page-image">
    "><img src="<?php echo get_template_directory_uri();?>/script/timthumb.php?src=<?php print $imagedata->attributes()->src;?>&w=804&h=242&zc=1&q=100" alt="<?php the_title(); ?>" class="hoverimg" />
    </div><!--Closes blog-page-image-holder-->
    <?php }?>

    <div class="blog-info-holder">
    <div class="info-text"> "><img src="<?php echo get_template_directory_uri(); ?>/style/img/by.png" />
    <?php echo $written; ?>
    <div class="info-text"><img src="<?php echo get_template_directory_uri(); ?>/style/img/calendar-post.png" />
    <?php the_time('F');?> <?php the_time('d');?>, <?php the_time('Y');?></div>

    <div class="blog-content-holder">
    <div class="blog-post-text"><?php truncate_post('600');?></div>



    You did not specify a blog address or reason for posting when you created this topic.

    This support forum is for blogs hosted at If your question is about a self-hosted WordPress blog then you’ll find help at the forums.

    If you don’t understand the difference between and, you may find this information helpful.

    If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.

    This is an automated message.

The topic ‘Using more tag instead the 'truncate_post' function’ is closed to new replies.