<?php query_posts('posts_per_page=5'); ?>
<div id="content" class="narrowcolumn" role="main">
[COLOR="Red"]اینجا محل قرار گرفتن تابع هست[/COLOR]
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><?php the_title(); ?></h2>
<div class="entry">
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
</div>
<?php endwhile; endif; ?>
<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
<?php comments_template(); ?>
</div>
<?php
if (is_home()){
query_posts('posts_per_page=1');
}
<? get_header(); ?>
<table width="900" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<!--top-->
<div align="center" class="topleft-div"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/logo.gif" alt="logo" /></div>
<div align="center" class="topright-div"><?php include ('ajax.php'); ?></div>
<!--middele-->
<div class="left1"></div>
<div class="leftmaincontent">
<div class="maintop"></div>
<div class="main">
<!--blog baslar-->
<?php while (have_posts()) { the_post(); ?>
<div class="img-comment"><span class="commenttext"><?php comments_number('0','1','%'); ?></span></div><div class="spanstyle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></div>
<div class="post" id="post-<?php the_ID(); ?>">
<?php if ( $img = get_post_meta($post->ID, "image", true) ) { ?>
<div class="headline">
<img src="<?=$img?>" alt="" width="371" height="198" border="0" />
<span><?php the_time("M<b\i\g>j</b\i\g>") ?></span>
</div>
<? } else { ?>
<div class="date">
<span><?php the_time("M<b\i\g>j</b\i\g>") ?></span>
</div>
<? } ?>
<div class="text">
<?php the_content('continue reading »'); ?>
</div>
</div>
<?php } ?>
<div class="post"><?php comments_template(); ?></div>
<!--blog blog biter-->
</div>
<div class="mainbottom"></div>
</div>
<div class="left2"></div>
<!-- right main -->
<?php get_sidebar(); ?>
<!--right main-->
</td>
</tr>
</table>
<?php get_footer(); ?>