In this article, weâll show you 10 useful things you can do with the WordPress loop to make your blog even more powerful than it is right now.
seen from Colombia

seen from China
seen from Hong Kong SAR China
seen from Canada
seen from United States

seen from Germany
seen from Japan

seen from Indonesia
seen from Germany
seen from United States
seen from Germany

seen from Philippines

seen from Germany
seen from Germany

seen from Brazil
seen from China

seen from Germany
seen from China

seen from United Kingdom

seen from Germany
In this article, weâll show you 10 useful things you can do with the WordPress loop to make your blog even more powerful than it is right now.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Wordpress custom loop & the loop
So you wan to use a custom wordpress loop and "the loop" together with no problem?
This is one way to do it, and what i find very easy to use.
For the custom wordpress loop you will have to specify the parameters you want to use.
Eg. $query->query( 'showpost=10&post_type=page&p=32' )
Find the wordpress query parameters here
/* `Custom wordpress loop -----------------------------------------*/ <?php $query = new WP_Query(); $query->query( 'showposts=10' ); while ( $query->have_posts() ) : $query->the_post(); ?> <?php echo the_title(); ?>
<?php echo the_excerpt(); ?> <?php endwhile; ?> /* `The loop -----------------------------------------*/ <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <h2><?php the_title(); ?></h2> <?php the_content(); ?> <?php endwhile; endif; ?>
Суперкод
Для запиту постів у page template з пагінацією
<?php
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query('cat=4&posts_per_page=4'.'&paged='.$paged);
while ($wp_query->have_posts()): $wp_query->the_post(); ?>
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<?php endwhile; ?>
<?php get_template_part('navigation'); ?>
<?php $wp_query = null; $wp_query = $temp; ?>