Hallo liebe Leser,
Ich bin momentan dabei, eine Website mit Wordpress als CMS umzusetzen. Die Site hat mehrere statische Seiten (eigentlich nur statische) - wobei die News per Artikel eingepflegt werden sollten. Ich möchte gerne als Startseite eine statische Seite haben, auf der ein Begrüßungstext bzw. eine Einleitung steht, und darunter sollen die Artikel aus der Kategorie 'News' angezeigt werden. Dazu habe ich ein Template 'Neues' (neues.php im Theme Ordner) erstellt (Kopie der page.php des Themes) und habe die Änderungen laut Artikel der Kategorie X auf Seite Y anzeigen « WordPress Deutschland FAQ (wie so oft im Forum erwähnt) durchgeführt. Nur leider verschluckt das Template den Inhalt der statischen Seite und gibt nur meine Artikel (News) aus. Hier der Quelltext. Ich bin überfragt woran das liegt.
<?php
/*
Template Name: Neues
*/
?>
<?php get_header(); ?>
<div class="art-contentLayout">
<div class="art-content">
<?php query_posts('category_name=News'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="art-Post">
<div class="art-Post-body">
<div class="art-Post-inner art-article">
<h2 class="art-PostHeaderIcon-wrapper">
<span class="art-PostHeader"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
<?php the_title(); ?>
</a></span>
</h2>
<?php $icons = array(); ?>
<?php if (!is_page()): ?><?php ob_start(); ?><?php the_time(__('F jS, Y', 'kubrick')) ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (current_user_can('edit_post', $post->ID)): ?><?php ob_start(); ?><?php edit_post_link(__('Edit', 'kubrick'), ''); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?>
<div class="art-PostHeaderIcons art-metadata-icons">
<?php echo implode(' | ', $icons); ?>
</div>
<?php endif; ?>
<div class="art-PostContent">
<?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry »', 'kubrick')); ?>
</div>
<div class="cleared"></div>
</div>
</div>
</div>
<?php endwhile; endif; ?>
</div>
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
</div>
<div class="cleared"></div>
<?php get_footer(); ?>
Alles anzeigen
Vielleicht kann mir jemand mit der Anpassung des Templates helfen. :?