Need help? Check out our Support site, then

Using more tag instead the 'truncate_post' function

  1. imischievousboy


    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<br /> if ( have_posts() ) : while ( have_posts() ) : the_post();<br /> $data = get_post_meta( $post->ID, GD_THEME, true );<br /> $title = the_title('','',FALSE);<br /> $title = strtoupper($title);<br /> if ($title<>substr($title,0,165)) {<br /> $dots = "...";<br /> }else {<br /> $dots = "";<br /> }<br /> ?></p> <p> <div class="blog-one-post"><br /> <?php $imagedata = simplexml_load_string(get_the_post_thumbnail()); ?><br /> <?php<br /> $comments = get_comments("post_id=$post->ID");<br /> $num_of_comments = 0;<br /> foreach((get_the_category()) as $category) {<br /> $post_category = $category->cat_name;<br /> $post_category_id = $category->cat_ID;<br /> $cat_slug=get_cat_slug($post_category_id);<br /> }</p> <p> foreach($comments as $comm) :<br /> $num_of_comments++;<br /> endforeach;<br /> $written = $post->post_author;<br /> $user = get_user_by('id',$written);<br /> $written = $user->nickname;<br /> ?></p> <p> <div class="blog-post-title"><a>"><?php $title()); ?></a></div></p> <p> <?php if (has_post_thumbnail()) { ?><br /> <div class="blog-page-image-holder"><br /> <div class="blog-page-image-center"><br /> <span class="blog-page-image"><br /> <a>"><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" /></a><br /> </span><br /> </div><br /> </div><!--Closes blog-page-image-holder--><br /> <?php }?></p> <p> <div class="blog-info-holder"><br /> <div class="info-text"> <a>"><img src="<?php echo get_template_directory_uri(); ?>/style/img/by.png" /><br /><?php echo $written; ?></a></div><br /> <div class="info-text"><img src="<?php echo get_template_directory_uri(); ?>/style/img/calendar-post.png" /><br /><?php the_time('F');?> <?php the_time('d');?>, <?php the_time('Y');?></div><br /> </div></p> <p> <div class="blog-content-holder"><br /> <div class="blog-post-text"><?php truncate_post('600');?></div><br /> <a>">More..</a><br /> </div>

  2. 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.

Topic Closed

This topic has been closed to new replies.

About this Topic