Forums

[resolved] the_excerpt() the_content() (4 posts)

  1. keeperbay
    Member
    Posted 1 year ago #

    I'm using template: 48. Tanzaku from here:
    http://www.instantshift.com/2010/02/19/60-latest-high-quality-free-wordpress-themes/

    I have it setup on: http://barefootmarket.com/

    The template is perfect for me, but it prints the entire most and not just the excerpt.

    I know you have to go into some file and change "the_content()" TO "the_excerpt()" - but where.

    I've searched every file and I don't see the the_content() comment.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Try looking in index.php within the theme.

  3. keeperbay
    Member
    Posted 1 year ago #

    Thank you. I did and it does have "the_content()" but I've tried different combination and none of them seem to work.

    I must be change the wrong bit of code, I've done this a hundred times, but this time I can't figure out the write combination.

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    		<div <?php post_class('single-item'); ?> id="post-<?php the_ID(); ?>">
    			<h2 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    			<div class="post-body">
    				<?php
    					if ($flg_img_extract) {
    $content = get_the_content();
    $content = apply_filters('the_content', $content);
    $content = adjust_single_image($content);
    echo $content;
    else {
    the_content();
    }
    ?>
    			</div>
    			<?php wp_link_pages('before=<p class="pagination" id="post-pagination"><span class="prefix">' . __('Pages:') . '</span>'); ?>
    			<p class="post-meta">
    			Published on <?php the_time( get_option('date_format') ); ?> <?php the_time(); ?>.<br />
    			Filed under: <?php the_category(', ') ?> <?php the_tags('Tags: ', ', '); ?>
    			<?php edit_post_link(__("Edit This"), '(', ')'); ?>
    			</p>
    		</div>
    
    <?php comments_template(); ?>
  4. keeperbay
    Member
    Posted 1 year ago #

    GOT IT!

    Thank you. I took another look, went down a few lines and found the right bit of code

    <?php if (have_posts()) :
    	if ( $is_top_single ) $GLOBALS['more'] = false; //important
    	while (have_posts()) : the_post(); ?>
    <?php
    	$content = get_the_excerpt('Details &raquo;');
    	$content = apply_filters('the_content', $content);
    	list($col_class, $grid_img) = adjust_grid_image(
    		$content,
    		$col_w,
    		$gap_w,
    		$max_col,
    		$flg_img_forcelink,
    		$flg_obj_fit
    	);
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic