Advertisement
alchymyth

Untitled

Mar 29th, 2011
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.12 KB | None | 0 0
  1. <?php // Display this loop for the blog
  2. } else { ?>
  3.  
  4.        
  5.         <?php $count = 0; ?>
  6.            
  7.         <?php if (have_posts()) : ?>
  8.        
  9.             <div class="posts">
  10.                                                                        
  11.             <?php while (have_posts() && ($count < '4')) : the_post(); $count++; ?>
  12.            
  13.                 <?php
  14. $subcat = get_categories('child_of=47'); $ids47 = array('47'); foreach($subcat as $c) $ids47[] = (string)$c->term_id;
  15.  
  16. $subcat = get_categories('child_of=4'); $ids4 = array('4'); foreach($subcat as $c) $ids4[] = (string)$c->term_id;
  17.  
  18. $subcat = get_categories('child_of=14'); $ids14 = array('14'); foreach($subcat as $c) $ids14[] = (string)$c->term_id;
  19.  
  20. $subcat = get_categories('child_of=5'); $ids5 = array('5'); foreach($subcat as $c) $ids5[] = (string)$c->term_id;
  21.  
  22.                 if ( in_category($ids47) ) { ?>    
  23.                     <div class="post small">
  24.                     <div class="post-img-small-news fl"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('small'); ?></a></div>
  25.                     <h2 class="post-title fl"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  26.                     <div class="post-comments fr"><?php comments_popup_link('0', '1', '%'); ?></div>
  27.                     <p class="post-meta-news fl"><?php the_time('j F Y'); ?>, In <strong><?php the_category(', '); ?></strong> | Autore <strong><?php the_author_posts_link(); ?></strong></p>
  28.                     <p class="post-excerpt-news fl"><?php the_excerpt(); ?></p>
  29.                     <div class="clear"></div>
  30.                 </div><!--post(small)-->
  31.                
  32.              <?php } elseif ( in_category($ids4) ) { ?>
  33.                 <div class="post small">
  34.                     <div class="post-img-small-extra fl"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('small'); ?></a></div>
  35.                     <h2 class="post-title fl"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  36.                     <div class="post-comments fr"><?php comments_popup_link('0', '1', '%'); ?></div>
  37.                     <p class="post-meta-extra fl"><?php the_time('j F Y'); ?>, In <strong><?php the_category(', '); ?></strong> | Autore <strong><?php the_author_posts_link(); ?></strong></p>
  38.                     <p class="post-excerpt-extra fl"><?php the_excerpt(); ?></p>
  39.                     <div class="clear"></div>
  40.                 </div><!--post(small)-->
  41.                
  42.              <?php } elseif ( in_category($ids14) ) { ?>
  43.                 <div class="post small">
  44.                     <div class="post-img-small-libri fl"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('small'); ?></a></div>
  45.                     <h2 class="post-title fl"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  46.                     <div class="post-comments fr"><?php comments_popup_link('0', '1', '%'); ?></div>
  47.                     <p class="post-meta-libri fl"><?php the_time('j F Y'); ?>, In <strong><?php the_category(', '); ?></strong> | Autore <strong><?php the_author_posts_link(); ?></strong></p>
  48.                     <p class="post-excerpt-libri fl"><?php the_excerpt(); ?></p>
  49.                     <div class="clear"></div>
  50.                 </div><!--post(small)-->
  51.                
  52.             <?php } elseif ( in_category($ids5) ) { ?>
  53.                 <div class="post small">
  54.                     <div class="post-img-small-finzioni fl"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('small'); ?></a></div>
  55.                     <h2 class="post-title fl"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  56.                     <div class="post-comments fr"><?php comments_popup_link('0', '1', '%'); ?></div>
  57.                     <p class="post-meta-finzioni fl"><?php the_time('j F Y'); ?>, In <strong><?php the_category(', '); ?></strong> | Autore <strong><?php the_author_posts_link(); ?></strong></p>
  58.                     <p class="post-excerpt-finzioni fl"><?php the_excerpt(); ?></p>
  59.                     <div class="clear"></div>
  60.                 </div><!--post(small)-->
  61.             <?php } ?>
  62.                
  63.             <?php endwhile; ?>
  64.            
  65.             </div><!--posts-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement