Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. <div class="box">
  2.  
  3. <?php
  4. $exclude_in_secondary = ''; // Post IDs to exclude from secondary posts column.
  5.  
  6. $the_query = new WP_Query( 'cat=-'. $GLOBALS['ex_feat'] . ',-' . $GLOBALS['ex_vid'] . '&showposts=' . get_option( 'woo_other_entries' ) . '&orderby=post_date&order=desc' );
  7. while ($the_query->have_posts()) : $the_query->the_post(); $do_not_duplicate = $post->ID; $counter++;
  8.  
  9. if ( $exclude_in_secondary == '' ) {} else { $exclude_in_secondary .= ','; }
  10.  
  11. $exclude_in_secondary .= get_the_ID();
  12. ?>
  13. <div class="post-alt blog">
  14.  
  15. <?php woo_image('height=57&width=100&class=th') ?>
  16.  
  17. <h2><a title="<?php _e( 'Permanent link to ', 'woothemes' ); ?> <?php the_title_attribute( array( 'echo' => 0 ) ); ?>" href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  18. <p class="posted_on"><?php _e( 'Posted on ', 'woothemes' ); ?> <?php the_time( 'd F Y' ); ?> <?php edit_post_link( __('Edit'), ' &#183; ', '' ); ?></p>
  19.  
  20. <div class="entry">
  21. <?php the_excerpt(); ?>
  22. </div>
  23.  
  24. <div class="postmeta">
  25. <span class="posted_in"><?php the_category(', ') ?></span>
  26. <span class="comments"><?php comments_popup_link( __( '0 Comments', 'woothemes' ), __( '1 Comment', 'woothemes' ), __( '% Comments', 'woothemes' ) ); ?></span>
  27. </div>
  28.  
  29. </div><!--/post-->
  30.  
  31. <?php endwhile; ?>
  32.  
  33. <div class="fix"></div>
  34.  
  35. <p class="more"><a href="<?php echo get_option( 'woo_archives' ); ?>"><?php _e( 'See more articles in the archive', 'woothemes' ); ?></a></p>
  36.  
  37. </div>
  38. <?php
  39. // Update database with posts to exclude from secondary column.
  40. $current_exclude_in_secondary = get_option( 'woo_posts_exclude_secondary' );
  41.  
  42. // Update only if necessary.
  43. if ( $current_exclude_in_secondary != $exclude_in_secondary ) { update_option( 'woo_posts_exclude_secondary', $exclude_in_secondary ); }
  44. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement