javadth
Elite Member
- Aug 27, 2012
- 1,973
- 539
hi in my theme i set full content for index , but i want to use Excerpt in categories for example show 300 word
this is my index
and this sis my loop php file
this is my index
PHP:
<?php get_header(); ?>
<div id="content">
<div id="main" role="main">
<?php get_template_part('loop'); ?>
</div>
<?php get_sidebar(); ?>
</div>
<div class="clear"></div>
<?php get_footer(); ?>
and this sis my loop php file
PHP:
<?php
while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" class="post clearfix">
<div class="post-content">
<h2 class="title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'wpzoom' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="top-meta">
<?php if (option::get('display_date') == 'on') { ?><span class="date"><?php printf( __('%s at %s', 'wpzoom'), get_the_date(), get_the_time()); ?></span><?php } ?>
<?php edit_post_link( __('Edit', 'wpzoom'), '<span>', '</span>'); ?>
</div><div class="clear"></div>
<div class="entry">
<?php if (option::get('display_content') == 'Full Content') { the_content(''); } else { the_excerpt(); } ?>
<div class="clear"></div>
</div><!-- /.entry -->
</div><!-- /.post-content -->
<div class="clear"></div>
<div class="post-meta clearfix">
<?php if (option::get('display_share') == 'on') { ?>
<?php } ?>
<?php if (option::get('display_readmore') == 'on') { ?><span class="readmore"><a href="<?php the_permalink() ?>"><?php _e('بیشتر بخوانید', 'wpzoom'); ?></a></span><?php } ?>
<?php if (option::get('display_comments') == 'on') { ?><?php comments_popup_link( '0', '1', '%', 'comments', __('Comments Off', 'wpzoom')); ?><?php } ?>
</div>
</div><!-- #post-<?php the_ID(); ?> -->
<?php endwhile; ?>
<?php get_template_part( 'pagination'); ?>
<?php wp_reset_query(); ?>