Template Problem
-
Hi , i want make query from posts but this code create query from current Page as thumbnail .
what do you think about that ?<?php /* Template Name: newscat */ get_header(); ?> <div class="site-content-wrapper"> <div id="content" class="blog-content"> <div class="col-md-9"> <?php while (have_posts()) : the_post(); ?> <div class="item-post"> <a href="<?php the_permalink(); ?>"> <?php if(has_post_thumbnail() ) : the_post_thumbnail('large'); ?> <?php else : ?> <img src="<?php echo get_template_directory_uri(); ?>/images/post_image.jpg" class="wp-post-image" /> <?php endif; ?> <h2 class="post-title"><?php the_title(); ?></h2> </a> <!-- <?php if( 'on' == of_get_option('sc_blog_featured', 'on')) : ?> <div class="post-thumb col-sm-4"> <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail('large'); ?> </a> </div> <?php endif; ?> <div class="col-sm-8 <?php echo 'on' == of_get_option('sc_blog_featured', 'on') ? '' : 'featured_none'; ?>"> <h2 class="post-title"> <a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a> </h2> <div class="post-content"> <?php the_excerpt(); ?> </div> <div class="text-right"> <a class="button button-primary" href="<?php the_permalink(); ?>">Read More</a> </div> </div>--> </div> <?php endwhile; ?> </div> <?php avenue_paging_nav(); ?> </div> <div class="clear"></div> </div> <?php get_footer(); ?> <script> jQuery(document).ready(function($){ $('.site-content-wrapper .site-content').imagesLoaded(function () { $('.site-content-wrapper .site-content').masonry({ itemSelector: '.item-post', gutter: 0, transitionDuration : 0, }).masonry('reloadItems').masonry(); }); }); </script>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Template Problem’ is closed to new replies.