Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //2 custom WP_Query Loops on the Static Home page
- <?php // Loop1
- $first_query = new WP_Query('cat=7&showposts=3');
- while($first_query->have_posts()) : $first_query->the_post(); ?>
- <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
- <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
- <?php the_content(); ?>
- </div>
- <?php endwhile; ?>
- <?php wp_reset_postdata(); ?>
- </ul>
- <p><a href="http://s-usih.org/member-news">Read more Member News</a></p>
- </div><!--.leftcolumn2-->
- <div class="rightcolumn2 recentblog">
- <h1 class="highlight1">Latest Blog</h1>
- <?php // Loop2
- $second_query = new WP_Query('cat=1941&showposts=1');
- while($second_query->have_posts()) : $second_query->the_post(); ?>
- <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
- <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
- <?php the_content(); ?>
- </div>
- <?php endwhile; ?>
- <?php wp_reset_postdata(); ?>
- //and 1 main loop on the blogtemplate where main blog is located:
- <?php query_posts('cat=1941&posts_per_page=3');
- if (have_posts()) : while (have_posts()) : the_post(); ?>
- <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
- <?php the_content(); ?>
- <?php endwhile; endif; ?>
- <?php wp_simple_pagination(); ?>
- <?php wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement