Hi Leute!
Nachdem mir mit meinem ersten Problem so prima geholfen wurde, habe ich noch eine weitere Frage.
Ich möchte auf einzelnen Seiten Artikel unterschiedlicher Kategorien anzeigen lassen in Form eines dreispaltigen Designs so:
Seite 1: Sidebar - Kategorie1 - Kategorie2
Seite 2: Sidebar - Kategorie3 - Kategorie4
Auf meiner Startseite/Artikelseite ( http://www2.manmed.org ) bekomme ich das prima hin, genauso wie ich es möchte. Wenn ich jetzt aber meine index.php als pageofposts.php speichere und als Template für eine einzelne Seite verwende, um mir auch dort Artikel anzeigen zu lassen, zieht er mir die Sidebar auf die volle Breite und zeigt keine Artikelspalten an. Auch wenn ich das im WP-Codex verwendete Template ( http://codex.wordpress.org/Pages#A_Page_o…ustom_Post_Type ) benutze passiert das gleiche.
Was mache ich falsch? Hier meine index.php:
<?php get_header(); ?>
<div class="art-contentLayout">
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?><div class="art-content">
<?php if (have_posts()) : ?>
<div id="column01">
<?php query_posts('category_name=News&posts_per_page=10'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="art-Post">
<div class="art-Post-body">
<div class="art-Post-inner art-article">
<h2 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>
</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 (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')); ?>
<?php if (is_page() or is_single()) wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
<div class="cleared"></div>
</div>
<div class="cleared"></div>
</div>
</div>
<?php endwhile; ?>
</div>
<div id="column02">
<?php query_posts('category_name=books&posts_per_page=10'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="art-Post">
<div class="art-Post-body">
<div class="art-Post-inner art-article">
<h2 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>
</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 (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')); ?>
<?php if (is_page() or is_single()) wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
<div class="cleared"></div>
</div>
<div class="cleared"></div>
</div>
</div>
<?php endwhile; ?>
</div>
<?php
$prev_link = get_previous_posts_link(__('Newer Entries »', 'kubrick'));
$next_link = get_next_posts_link(__('« Older Entries', 'kubrick'));
?>
<?php if ($prev_link || $next_link): ?>
<div class="art-Post">
<div class="art-Post-body">
<div class="art-Post-inner art-article">
<div class="art-PostContent">
<div class="navigation">
<div class="alignleft"><?php echo $next_link; ?></div>
<div class="alignright"><?php echo $prev_link; ?></div>
</div>
</div>
<div class="cleared"></div>
</div>
<div class="cleared"></div>
</div>
</div>
<?php endif; ?>
</div>
<?php else : ?>
<h2 class="center"><?php _e('Not Found', 'kubrick'); ?></h2>
<p class="center"><?php _e('Sorry, but you are looking for something that isn’t here.', 'kubrick'); ?></p>
<?php if(function_exists('get_search_form')) get_search_form(); ?>
<?php endif; ?>
</div>
<div id="cont">
<div class="cleared"></div>
<?php get_footer(); ?>
</div>
Alles anzeigen
Vielen Dank für Eure Antworten!
boris