File: /home/khakzad/public_html/milad/wp-content/themes/Saman-1/index.php
<?php if (is_archive()) $post_number = get_option('aggregate_archivenum_posts');
if (is_search()) $post_number = get_option('aggregate_searchnum_posts');
if (is_tag()) $post_number = get_option('aggregate_tagnum_posts');
if (is_category()) $post_number = get_option('aggregate_catnum_posts'); ?>
<?php get_header(); ?>
<div id="main-content" class="clearfix">
<div id="left-area">
<?php include(TEMPLATEPATH . '/includes/breadcrumbs.php'); ?>
<div id="entries">
<?php if ( is_active_sidebar( '468_top_area' ) ) { ?>
<?php if ( !dynamic_sidebar('468_top_area') ) : ?>
<?php endif; ?>
<?php } ?>
<?php
global $query_string;
$i = 0;
if (is_category()) query_posts($query_string . "&showposts=$post_number&paged=$paged&cat=$cat");
else query_posts($query_string . "&showposts=$post_number&paged=$paged");
?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php $i++; ?>
<?php include(TEMPLATEPATH . '/includes/entry.php'); ?>
<?php endwhile; ?>
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
else { ?>
<?php include(TEMPLATEPATH . '/includes/navigation.php'); ?>
<?php } ?>
<?php else : ?>
<?php include(TEMPLATEPATH . '/includes/no-results.php'); ?>
<?php endif; wp_reset_query(); ?>
<?php if ( is_active_sidebar( '468_bottom_area' ) ) { ?>
<?php if ( !dynamic_sidebar('468_bottom_area') ) : ?>
<?php endif; ?>
<?php } ?>
</div> <!-- end #entries -->
</div> <!-- end #left-area -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>