Legutóbbi bejegyzések kilistázása

Sziasztok WP fórumozók!











Egy kis segítségre lenne szükségem!











Szeretnék létrehozni a főoldalon egy olyan linket, ami a korábbi bejegyzéseket mutatja.











Abban az elrendezésben szeretném kilistázni az archív bejegyzéseket, ahogy a sablonom kilistázza az egyes kategóriákban található cikkeket. > http://simracing.hu/category/konzol











Tehát a linken található megjelenésben szeretném megjeleníteni az utolsó 20-30 cikket ami az oldalon megjelent, úgy hogy a főoldalon legyen egy erre mutató link.











Van valakinek ötlete, hogy hogyan tudnám ezt a dolgot kivitelezni?











Az esetleges válaszokat előre is köszönöm!











Ha minden igaz ez a kategóriákat kilistázó php fájl tartalma:




















<?php global $bnews_options, $blognews; ?>

<?php get_header(); ?>





<?php if(!is_category($bnews_options["blogID"])) { ?>

<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>

<?php /* If this is a category archive */ if (is_category()) { ?>

<?php echo $blognews["catarc"]; ?> ‘<?php single_cat_title(); ?>’



<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>

<?php echo $blognews["tagarc"]; ?> ‘<?php single_tag_title(); ?>’



<?php /* If this is a daily archive */ } elseif (is_day()) { ?>

<?php echo $blognews["datearc"]; ?> ‘<?php the_time('F jS, Y'); ?>’



<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>

<?php echo $blognews["datearc"]; ?> ‘<?php the_time('F, Y'); ?>’



<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>

<?php echo $blognews["datearc"]; ?> ‘<?php the_time('Y'); ?>’



<?php /* If this is an author archive */ } elseif (is_author()) { ?>

<?php echo $blognews["autharc"]; ?>



<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>

<?php echo $blognews["blogarc"]; ?>



<?php } ?>

<?php } ?>



<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<?php the_title(); ?>





<?php echo $blognews["writtenby"]; ?> <?php the_author_posts_link(); ?>

<?php the_category(', '); ?>

<?php the_time('M j, Y'); ?>







<?php if($bnews_options['enVideos'] == 1) { ?>

<?php if ( in_category($bnews_options["videoCatID"]) ): ?>









<?php endif; ?>

<?php } ?>

<?php if ( is_category($bnews_options["blogID"]) ) { the_content(); } else { ?>

<?php the_title(); ?>

<?php the_excerpt(); ?>

<?php } ?>





<?php endwhile; else : endif; ?>



<?php posts_nav_link(); ?>

















<?php get_sidebar(); ?>









<?php // if($bnews_options['enSubNewsSingle'] == 1 and !is_category($bnews_options["blogID"])) { /*If you want to display subnews section on archive pages, remove // after < ?php on this and following two lines */ ?>

<?php // include (TEMPLATEPATH . '/subnews.php'); /* 4 entries above the footer */ ?>

<?php // } ?>







<?php get_footer(); ?>








<?php global $bnews_options, $blognews; ?>


<?php get_header(); ?>








<?php if(!is_category($bnews_options["blogID"])) { ?>


<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>


<?php /* If this is a category archive */ if (is_category()) { ?>


<?php echo $blognews["catarc"]; ?> ‘<?php single_cat_title(); ?>’




<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>


<?php echo $blognews["tagarc"]; ?> ‘<?php single_tag_title(); ?>’




<?php /* If this is a daily archive */ } elseif (is_day()) { ?>


<?php echo $blognews["datearc"]; ?> ‘<?php the_time('F jS, Y'); ?>’




<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>


<?php echo $blognews["datearc"]; ?> ‘<?php the_time('F, Y'); ?>’




<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>


<?php echo $blognews["datearc"]; ?> ‘<?php the_time('Y'); ?>’




<?php /* If this is an author archive */ } elseif (is_author()) { ?>


<?php echo $blognews["autharc"]; ?>




<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>


<?php echo $blognews["blogarc"]; ?>




<?php } ?>


<?php } ?>





<?php if (have_posts()) : while (have_posts()) : the_post(); ?>


<?php the_title(); ?>







<?php echo $blognews["writtenby"]; ?> <?php the_author_posts_link(); ?>


<?php the_category(', '); ?>


<?php the_time('M j, Y'); ?>











<?php if($bnews_options['enVideos'] == 1) { ?>


<?php if ( in_category($bnews_options["videoCatID"]) ): ?>














<?php endif; ?>


<?php } ?>


<?php if ( is_category($bnews_options["blogID"]) ) { the_content(); } else { ?>


<?php the_title(); ?>


<?php the_excerpt(); ?>


<?php } ?>








<?php endwhile; else : endif; ?>





<?php posts_nav_link(); ?>


























<?php get_sidebar(); ?>














<?php // if($bnews_options['enSubNewsSingle'] == 1 and !is_category($bnews_options["blogID"])) { /*If you want to display subnews section on archive pages, remove // after < ?php on this and following two lines */ ?>


<?php // include (TEMPLATEPATH . '/subnews.php'); /* 4 entries above the footer */ ?>


<?php // } ?>











<?php get_footer(); ?>








Látom senki sem tudja a választ, lehet hogy külföldi fórumon kellenék érdeklődni?

Már majdnem beírtam a választ (ha én tudnám…), de látom, hogy türelmetlen vagy, továbbá nagyon megfenyegetve éreztem magamat, hogy külföldi oldalakon érdeklődsz, így elálltam a válaszadási lehetőségtől.











Lehet, hogy nélkülem csak a Codexben lelsz megoldást? :slight_smile: :slight_smile:

Akkor belekukkantok a codex-be!