| Выкладываю код index.php полностью: <?php global $options; foreach ($options as $value) { if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); } } ?> <?php get_header(); ?> <?php if ( $paged < 2) { ?> <?php $args = array('showposts' => 5, 'orderby' => 'date', 'order' => 'DESC'); $featType = $wpzoom_featured_type; if ($featType == 'Tag') { $args['tag'] = "$wpzoom_featured_slug"; // Breaking tag slug } elseif ($featType == 'Category') { $args['cat'] = "$wpzoom_featured_slug"; // Breaking tag slug } ?> <div id="featuredStories"> <div id="featuredMain"> <?php query_posts($args); $i = 0; while (have_posts()) : the_post(); $i++; ?> <div id="tabcontent<?php echo"$i"; ?>"> <div class="cover"><?php unset($img); if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) { the_post_thumbnail(array(450,600, true)); } else{ if ($wpzoom_cf_use == 'Yes') { $img = get_post_meta($post->ID, $wpzoom_cf_photo, true); } // if CF used else { if (!$img) { $img = catch_that_image($post->ID); } } // if CF not used if ($img) { ?> <a href="<?php the_permalink(); ?>" rel="bookmark"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=450&w=600&zc=1&src=<?ph p echo $img ?>" /></a> <?php } else { ?> <a href="<?php the_permalink(); ?>" rel="bookmark"><img src="<?php bloginfo('template_directory'); ?>/images/no-photo.png" width="440" height="250" /></a><?php } // if $img still does not exist } // if theme does not have a thumbnail ?></div><!-- end .cover --> <h2><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <p class="postmetadata"><span class="timestamp"><?php the_time('F j, Y'); ?></span> | <span class="category"><?php the_category(', '); ?></span> | <span class="comments"><a href="<?php the_permalink() ?>#commentspost" title="Jump to the comments"><?php comments_number('Комментарии отсутствуют','1 comment','% comments'); ?></a></span><?php edit_post_link( __('РЕДАКТИРОВАТЬ'), ' | ', ''); ?></p> <p><?php the_content_limit(240, ''); ?></p> <p class="more"><a href="<?php the_permalink(); ?>" rel="bookmark" title="">Читать полностью »</a></p> </div><!-- end #tabcontent<?php echo"$i"; ?> --> <?php endwhile; // end tabcontent creation ?> </div><!-- end #featuredMain --> <div id="featuredList" class="menu"> <h4>Главные новости</h4> <ul> <?php query_posts($args); $i = 0; while (have_posts()) : the_post(); $i++; ?> <li onmouseover="easytabs('1', '<?php echo "$i"; ?>');" onfocus="easytabs('1', '<?php echo "$i"; ?>');" title="" id="tablink<?php echo "$i"; ?>"> <div class="featuredStory"> <?php unset($img); if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) { the_post_thumbnail(array(60,60, true)); } else{ if ($wpzoom_cf_use == 'Yes') { $img = get_post_meta($post->ID, $wpzoom_cf_photo, true); } // if CF used else { if (!$img) { $img = catch_that_image($post->ID); } } // if CF not used if ($img) { ?> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=60&w=60&zc=1&src=<?php echo $img ?>" class="cover" title=""/></a> <?php } else { ?> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/no-photo-s60.png" width="60" height="60" class="cover" /></a><?php } // if $img still does not exist } // if theme does not have a thumbnail ?> <div class="content"> <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <p><?php the_content_limit(200, ''); ?></p> </div> <div class="cleaner"> </div> </div><!-- end div.featuredStory --> </li> <?php endwhile; ?> </ul> </div><!-- end #featuredList, div.menu --> <div class="cleaner"> </div> </div><!-- end #featuredStories --> <?php if ($wpzoom_featured_cats_show == 'Yes') { ?> <div id="featuredCats"> <?php unset($catid); $catid = $wpzoom_featured_category_1; if ($catid) { $cat = get_category($catid,false); $catlink = get_category_link($catid); $breaking_cat1 = "cat=$catid"; // Breaking tag slug // $temp_query = clone $wp_query; $my_query = new WP_Query("showposts=$wpzoom_featured_categories_po sts&$breaking_cat1&order_by=post_date&order=DESC") ; ?> <div class="category"> <p class="header"><a href="<?php echo"$catlink";?>"><?php echo"$cat->name";?></a></p> <?php $i = 0; while ($my_query->have_posts()) : $my_query->the_post(); update_post_caches($posts); $i++; if ($i == 1) { ?> <div class="post"> <div class="cover"> <?php unset($img); if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) { the_post_thumbnail(array(250,440, true)); } else{ if ($wpzoom_cf_use == 'Yes') { $img = get_post_meta($post->ID, $wpzoom_cf_photo, true); } // if CF used else { if (!$img) { $img = catch_that_image($post->ID); } } // if CF not used if ($img) { ?> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=180&w=290&zc=1&src=<?ph p echo $img ?>" /></a> <?php } else { ?> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=180&w=290&zc=1&src=<?ph p bloginfo('template_directory'); ?>/images/no-photo.png" /></a><?php } // if $img still does not exist } // if theme does not have a thumbnail ?></div> <div class="column_count"><a href="<?php the_permalink() ?>#commentspost" title="Jump to the comments"><?php comments_number('0','1','%'); ?></a></div> <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <p><?php the_content_limit(140, ''); ?></p> <p class="more"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Читать полностью »</a></p> </div> <div class="sep"> </div> <p class="header"><a href="<?php echo get_category_feed_link($catid, $feed ); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/icon_rss.png" width="16" height="16" alt="" /></a><a href="<?php echo"$catlink";?>">Еще новости</a></p> <ul class="moreStories"> <?php } // if first post ($i == 1) else { ?><li><h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2></li><?php } endwhile; if ($i > 0) { echo"</ul>"; } ?> </div><!-- end div.category --> <?php } unset($catid); $catid = $wpzoom_featured_category_2; if ($catid) { $cat = get_category($catid,false); $catlink = get_category_link($catid); $breaking_cat2 = "cat=$catid"; // Breaking tag slug // $temp_query = clone $wp_query; $my_query = new WP_Query("showposts=$wpzoom_featured_categories_po sts&$breaking_cat2&order_by=post_date&order=DESC") ; ?> <div class="category"> <p class="header"><a href="<?php echo"$catlink";?>"><?php echo"$cat->name";?></a></p> <?php $i = 0; while ($my_query->have_posts()) : $my_query->the_post(); update_post_caches($posts); $i++; if ($i == 1) { ?> <div class="post"> <div class="cover"> <?php unset($img); if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) { the_post_thumbnail(array(250,440, true)); } else{ if ($wpzoom_cf_use == 'Yes') { $img = get_post_meta($post->ID, $wpzoom_cf_photo, true); } // if CF used else { if (!$img) { $img = catch_that_image($post->ID); } } // if CF not used if ($img) { ?> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=180&w=290&zc=1&src=<?ph p echo $img ?>" /></a> <?php } else { ?> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=180&w=290&zc=1&src=<?ph p bloginfo('template_directory'); ?>/images/no-photo.png" /></a><?php } // if $img still does not exist } // if theme does not have a thumbnail ?></div> <div class="column_count"><a href="<?php the_permalink() ?>#commentspost" title="Jump to the comments"><?php comments_number('0','1','%'); ?></a></div> <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <p><?php the_content_limit(140, ''); ?></p> <p class="more"><a href="<?php the_permalink(); ?>" title="">Читать полностью »</a></p> </div> <div class="sep"> </div> <p class="header"><a href="<?php echo get_category_feed_link($catid, $feed ); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/icon_rss.png" width="16" height="16" alt="" /></a><a href="<?php echo"$catlink";?>">Еще новости</a></p> <ul class="moreStories"> <?php } // if first post ($i == 1) else { ?><li><h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2></li><?php } endwhile; if ($i > 0) { echo"</ul>"; } ?> </div><!-- end div.category --> <?php } unset($catid); $catid = $wpzoom_featured_category_3; if ($catid) { $cat = get_category($catid,false); $catlink = get_category_link($catid); $breaking_cat3 = "cat=$catid"; // Breaking tag slug // $temp_query = clone $wp_query; $my_query = new WP_Query("showposts=$wpzoom_featured_categories_po sts&$breaking_cat3&order_by=post_date&order=DESC") ; ?> <div class="category category-last"> <p class="header"><a href="<?php echo"$catlink";?>"><?php echo"$cat->name";?></a></p> <?php $i = 0; while ($my_query->have_posts()) : $my_query->the_post(); update_post_caches($posts); $i++; if ($i == 1) { ?> <div class="post"> <div class="cover"> <?php unset($img); if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) { the_post_thumbnail(array(250,440, true)); } else{ if ($wpzoom_cf_use == 'Yes') { $img = get_post_meta($post->ID, $wpzoom_cf_photo, true); } // if CF used else { if (!$img) { $img = catch_that_image($post->ID); } } // if CF not used if ($img) { ?> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=180&w=290&zc=1&src=<?ph p echo $img ?>" /></a> <?php } else { ?> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=180&w=290&zc=1&src=<?ph p bloginfo('template_directory'); ?>/images/no-photo.png" /></a><?php } // if $img still does not exist } // if theme does not have a thumbnail ?></div> <div class="column_count"><a href="<?php the_permalink() ?>#commentspost" title="Jump to the comments"><?php comments_number('0','1','%'); ?></a></div> <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <p><?php the_content_limit(140, ''); ?></p> <p class="more"><a href="<?php the_permalink(); ?>" title="">Читать полностью »</a></p> </div> <div class="sep"> </div> <p class="header"><a href="<?php echo get_category_feed_link($catid, $feed ); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/icon_rss.png" width="16" height="16" alt="" /></a><a href="<?php echo"$catlink";?>">Еще новости</a></p> <ul class="moreStories"> <?php } // if first post ($i == 1) else { ?><li><h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2></li><?php } endwhile; if ($i > 0) { echo"</ul>"; } ?> </div><!-- end div.category --> <?php } ?> <div class="cleaner"> </div> </div><!-- end #featuredCats --> <?php } // if show featured categories ?> <?php } // end if $paged wp_reset_query(); ?> <div id="content<?php if ($paged > 1) {echo" content-archive";} ?>"> <div id="posts"> <p class="header"><a href="<?php if (strlen($wpzoom_misc_feedburner) < 10) { bloginfo('rss2_url');} else {echo"$wpzoom_misc_feedburner";} ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/icon_rss.png" width="16" height="16" alt="" /></a> Последние новости</p> <div class="cleaner"> </div> <?php $i = 0; $m = 0; while (have_posts()) : the_post(); $i++; $m++; ?> <div class="post post-normal"> <div class="cover"><?php unset($img); if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) { the_post_thumbnail(array(120,90, true)); } else{ if ($wpzoom_cf_use == 'Yes') { $img = get_post_meta($post->ID, $wpzoom_cf_photo, true); } // if CF used else { if (!$img) { $img = catch_that_image($post->ID); } } // if CF not used if ($img) { ?> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?h=90&w=120&zc=1&src=<?php echo $img ?>" /></a> <?php } else { ?> <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/no-photo-s.png" width="120" height="90" /></a><?php } // if $img still does not exist } // if theme does not have a thumbnail ?></div> <div class="content"> <div class="column_count"><a href="<?php the_permalink() ?>#commentspost" title="Jump to the comments"><?php comments_number('0','1','%'); ?></a></div> <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <p class="postmetadata"><span class="category"><?php the_category(', '); ?></span> | <span class="timestamp"><?php the_time('F j, Y'); ?></span><?php edit_post_link( __('Редактировать'), ' | ', ''); ?></p> <p><?php the_content_limit(160, ''); ?></p> <p class="more"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">Читать полностью »</a></p> </div> </div> <?php if ($sep) {echo"<div class=\"sep\"> </div>";} ?> <?php endwhile; ?> <div class="cleaner"> </div> <div class="sep"> </div> <div class="navigation pagerbox"> <?php next_posts_link('« Older Entries') ?> <?php previous_posts_link('Newer Entries »') ?> </div> </div><!-- end #posts --> <?php get_sidebar(); ?> </div><!-- end #content --> </div><!-- end main wrapper --> </div><!-- end #main --> <?php get_footer(); ?> |