php if is_category is_search is_tag is_page 229 is_home aside id recen

1
2
3
4
5
6
7
<?php if ( ! is_category() && ! is_search() && ! is_tag() && ! is_page(229) && ! is_home()) : ?>
<aside id="recent-posts" class="widget widget_recent_entries">
<!--noindex--><div class="widget-title">Волнующие темы</div>
<ul>
<?php $category = get_the_category(); rsort($category); $cat_add_id = $category[0]->term_id; $real_id = get_the_ID(); $args = array('cat' =>$cat_add_id,'numberposts' => 5); $posts = get_posts($args); foreach( $posts as $post ){ setup_postdata($post); if ($post->ID <> $real_id){ ?><li><a href="<?php the_permalink(); ?>" rel="nofollow"><?php the_post_thumbnail(array( 40,40 )); ?><?php the_title(); ?></a></li> <?php } } wp_reset_postdata(); ?></ul><!--/noindex-->
</aside>
<?php endif; ?>