Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <ul class="double-cloumn clearfix">
- <li id="left-column">
- <!-- gallery slideshow -->
- <?php echo do_shortcode('[doptg id="1"]'); ?>
- <!-- end gallery slide -->
- <!-- opening featured posts -->
- <?php
- $tags = wp_get_post_tags($post->ID);
- if ($tags) {
- $tag_ids = array();
- foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
- $args=array(
- 'tag__in' => $tag_ids,
- 'post__not_in' => array($post->ID),
- 'showposts'=>4, // Number of related posts that will be shown.
- 'caller_get_posts'=>1
- );
- $my_query = new wp_query($args);
- if( $my_query->have_posts() ) {
- echo '<div id="relatedposts"><h3>Featured Posts</h3><ul>';
- while ($my_query->have_posts()) {
- $my_query->the_post();
- ?>
- <?php
- if ( has_post_thumbnail() ) { ?>
- <li><div class="relatedthumb"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail(); ?><?php the_title(); ?></a></div></li>
- <?php } else { ?>
- <li><div class="relatedthumb"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><img src="<?php echo get_post_meta($post->ID, 'Image',true) ?>" width="196" height="110" alt="<?php the_title_attribute(); ?>" /><?php the_title(); ?></a></div></li>
- <?php }
- ?>
- <?php
- }
- echo '</ul>';
- }
- }
- $post = $backup;
- wp_reset_query();
- ?>
- <!-- closing featured posts -->
- <ul class="blog-main-post-container">
- <?php if (have_posts()) :
- global $show_author;
- $show_author = 1;
- while (have_posts()) : the_post(); setup_postdata($post);
- include(TEMPLATEPATH."/functions/fetch-list.php");
- endwhile;
- else :
- ocmx_no_posts();
- endif; ?>
- </ul>
- <?php motionpic_pagination("clearfix", "pagination clearfix"); ?>
- </li>
- <?php get_sidebar(); ?>
- </ul>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement