Chodzi mi o to że na stronie głównej są wyświetlane wszystkie posty, a na podstronach tylko z danej podstrony. Tak np. na podstronie aktualności są posty tylko z aktualności. W jaki sposób określić na stronie głównej wyświetlanie tylko postów z podstrony np. aktualności a nie wszystkich postów z kolejnych podstron ?
Próbując wykorzystać wp_query zmieniłem stronę główną w taki sposób:
<?php get_header(); ?>
<!-- ************************************************************* -->
<?php
// the query
$query = new WP_Query( 'paged=213' ); ?>
<!-- pagination here -->
<!-- the loop -->
<?php if ( $the_query->have_posts() ) : ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Starsze wpisy') ?></div>
<div class="alignright"><?php previous_posts_link('Nowsze wpisy »') ?></div>
<div style="clear:both;"></div>
</div>
<?php while ( $the_query->have_posts() ) : $the_query->the_post();
?>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<!-- ************************************************ -->
<div class="story">
<div class="story_title">
<div class="title_bg">
<div class="title_top">
<div class="title_bottom">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="story_category"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/cat_bullet.gif" alt="" /> Kategoria: <?php the_category(',') ?> autor: <?php the_author(); ?></div>
<div class="story_date"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/date_bullet.gif" alt="" /> <?php the_date('j.M.Y'); ?></div>
<div style="clear:both;"></div>
</div>
</div>
</div>
</div>
<div class="storyContent">
<?php the_content('Czytaj dalej...'); ?>
<div style="clear:both;"></div>
</div>
<div class="postmeta">
<p class="story_tags"><?php the_tags('<img src="'.get_bloginfo("stylesheet_directory").'/images/tag_bullet.gif" alt="" /> Tagi: ', ', ', '<br />'); ?></p>
<p class="read_more"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/bullet2.gif" alt="" /> <a href="<?php the_permalink(); ?>">Czytaj dalej...</a></p>
<div style="clear:both;"></div>
</div>
</div><!-- close story -->
<!-- ************************************************ -->
</div><!-- close postid-->
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Starsze wpisy') ?></div>
<div class="alignright"><?php previous_posts_link('Nowsze wpisy »') ?></div>
<div style="clear:both;"></div>
</div>
<?php wp_reset_postdata(); ?>
<?php else: ?>
<h2 class="error">Nie znaleziono</h2>
<p class="error">Niestety, nie ma tutaj tego, co szukasz.</p>
<?php //get_search_form(); ?>
<?php endif; ?>
<!-- ************************************************************* -->
</div>
</div>
<div class="content_bottom"></div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Teraz wywala mi błąd przy linijce $query = new WP_Query( 'paged=213' ); ?> . Jak zainstalować to wp_query w wordpressie ?