Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- START LOOP -->
- <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
- <div class="post">
- <h1><?php the_title(); ?></h1>
- <div class="image"><img src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php echo(types_render_field( "news-image", array( "url" => "true", "proportional" => "false" ) )); ?>&q=100&w=683" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" /></div>
- <div class="content">
- <?php the_content(); ?>
- </div>
- </div><!-- post -->
- <?php endwhile; else: ?>
- <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
- <?php endif; ?>
- /* HERE GOES ALL CATEGORY POSTS EXCEPT THE OPENED */
- <div class="custom-news">
- <div class="desc"><?php $category = get_the_category(); echo $category[0]->cat_name; ?></div>
- <?php $catid = the_category_ID( false ); ?>
- <?php $postCount = 1; $loop = new WP_Query( array( 'tax_query' => array(array(
- 'taxonomy' => 'category',
- 'field' => 'id',
- 'terms' => $catid
- )), 'post_type' => 'post', 'posts_per_page' => 15 ) ); if ($loop->have_posts()) { ?>
- <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
- <div class="custom-item">
- <a href="<?php the_permalink(); ?>"><?php the_title (); ?></a>
- </div>
- <?php endwhile; ?>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement