![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 2 Pomógł: 0 Dołączył: 7.10.2007 Ostrzeżenie: (0%) ![]() ![]() |
W pliku index mam ustawiony by wyświetlały się wpisy w jedenj kategori.
Kod <?php query_posts('cat=3'); ?> Dodałem jeszcze nawigacje w celu przejścia do starszych wpisów. Kod <?php next_posts_link('« Starsze wpisy') ?> W kategorii o ID 3 mam napisane 5 wpisów, ustawione by wyswietlało się po trzy. Gdy klikam 'Starsze wpisy' przechodze do następnej strony, lecz wpisy pozostają te same. Cały kod index: Kod <?php get_header(); ?> <?php query_posts('cat=3'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class="box"> <div class="boxed"> <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2> <span class="date"><?php the_category(', ') ?> | <?php the_time('d.m.Y');?></span> <span class="autor">napisane przez <?php the_author(); ?></span> <?php the_content(" " . the_title('', '', false)); ?> </div> </div> <?php endwhile; ?> <div class="history"> <!--<?php previous_posts_link('<div class="pozniej"></div>'); ?><?php next_posts_link('<div class="wczesniej"></div>'); ?>--> <?php posts_nav_link(' ', '<div class="wczesniej"></div>', '<div class="pozniej"></div>'); ?><br /> <?php next_posts_link('« Starsze wpisy') ?><br /> <?php previous_posts_link('Nowsze wpisy »') ?> </div> <?php else : ?> <h2>Not Found</h2> <p>Sorry, but you are looking for something that isn't here.</p> <?php endif; ?> </div> <?php get_footer(); ?> pozdro |
|
|
![]() ![]() |
![]() |
Aktualny czas: 21.08.2025 - 04:19 |