Ich würde gerne auf einer statischen Seite immer den jeweils aktuellen Monat aufrufen lassen.
In der Doku hab ich möglicherweise was dazu gefunden, nur leider komme ich damit nicht klar ... siehe Beispiel 2:
Template Tags/query posts ? WordDoku
Es wäre schön, wenn mir jemand helfen könnte.
Mein momentaner Quelltext sieht folgendermaßen aus:
PHP
<?php
/*
Template Name: archiv
*/
?>
<?php get_header(); ?>
<!--include sidebar-->
<?php get_sidebar('archive'); ?>
<div id="content">
<table border="0" cellpadding="4" cellspacing="1">
<tr>
<td width="100%"> </td>
</tr>
<tr>
<td width="100%" align="left"><b>archiv - <?php the_time('F Y'); ?></b></td>
</tr>
</table>
<!--the loop-->
<?php
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query('offset=2&showposts=3'.'&paged='.$paged);
?>
<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<!--post title as a link-->
<div class="postspace3">
</div>
<h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<!--post time-->
<?php the_time('j. F Y') ?>
<!--optional excerpt or automatic excerpt of the post-->
<p><?php the_excerpt(); ?>
<hr><?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« ältere Artikel') ?></div>
<div class="alignright"><?php previous_posts_link('neuere Artikel »') ?></div>
</div>
<?php $wp_query = null; $wp_query = $temp;?>
<!--archive.php end-->
</div>
<!--include footer-->
<?php get_footer(); ?>
Alles anzeigen