دستت درد نکنه دیگه داشتم نا امید میشدم
ببین کاری از دستت بر میاد
ممنون
<?php get_header(); ?>
<?php include(TEMPLATEPATH . '/sidebar1.php'); ?>
<div class="col1">
<div class="left-block">
<?php $recent = new WP_Query("showposts=1&cat=" . get_cat_ID(get_option('portal_left1'))); while($recent->have_posts()) : $recent->the_post();?>
<?php
vslider('vslider');
?>
<div class="author">
<h5>درباره نويسنده</h5>
<hr/>
<table>
<tr>
<td></td>
<td><?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 100 ) ); ?></td>
</tr>
<tr>
<td>نام کاربري نويسنده :</td>
<td>
<?php the_author_meta('display_name'); ?>
</td>
</tr>
<tr>
<td>نام و نام خانوادگي نويسنده :</td>
<td><?php the_author_meta('first_name') ;echo ' '; the_author_meta('last_name');?></td>
</tr>
<tr>
<td>رايانامه(ايميل) :</td>
<td><?php the_author_meta('user_email'); ?></td>
</tr>
<tr>
<td>زندگينامه(بيوگرافي) :</td>
<td><?php the_author_meta('description'); ?></td>
</tr>
</table>
</div>
<?php endwhile;?>
<div class="underline"></div>
<?php
$author = get_query_var('author');
$categories = $wpdb->get_results("
SELECT DISTINCT(terms.term_id) as ID, terms.name, terms.slug, tax.description
FROM $wpdb->posts as posts
LEFT JOIN $wpdb->term_relationships as relationships ON posts.ID = relationships.object_ID
LEFT JOIN $wpdb->term_taxonomy as tax ON relationships.term_taxonomy_id = tax.term_taxonomy_id
LEFT JOIN $wpdb->terms as terms ON tax.term_id = terms.term_id
WHERE 1=1 AND (
posts.post_status = 'publish' AND
posts.post_author = '$author' AND
tax.taxonomy = 'category' )
ORDER BY terms.name ASC
");
?>
<div class="categories">
<p>انتخاب يک دسته خاص براي نمايش:</p>
<ul >
<?php foreach($categories as $category) : ?>
<li>
<a href="<?php echo get_category_link( $category->ID ).'&author='; echo $author; ?>" title="<?php echo $category->name ?>">
<?php echo $category->name.' '.$category->description; ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php while ( have_posts() ) : the_post(); ?>
<div class="excerpt">
<h4>»<a href="<?php the_permalink()?>" rel="bookmark">
<?php the_title();?>
</a></h4>
<div class="left"><a href="<?php the_permalink(); ?>" class="small-thumbnail">
<?php zt_get_thumbnail($post->ID, 'thumbnail', 'alt="' . $post->post_title . '"'); ?>
</a></div>
<div class="list-right">
<?php zt_content_limit(305, ""); ?>
<div class="limit-line"><a href="<?php the_permalink()?>" rel="bookmark">ادامه مطلب </a><span class="more"></span><span class="comments">
<?php comments_popup_link('0 نظر', '1 نظر', '% نظر'); ?>
</span> </div>
<div>نويسنده : <?php the_author_posts_link(); ?></div>
</div>
<div class="underline"></div>
</div>
</a></h4>
<?php endwhile; ?>
</div>
</div>
<?php include(TEMPLATEPATH . '/sidebar2.php'); ?>
<div class="clear"></div>
<?php get_footer(); ?>