Hi *,
ich habe eine wordpress-betreuung übernommen und im zuge dessen mal das Silhouette-Theme von Brian Gardner installiert und ein wenig angepasst.
Und nun das: bei Posts und Seiten ohne Kommentar (z.B. Impressum : Ludolingua - Spiele im Fremdsprachenunterricht) sieht's prima aus, in der Variante Seite mit Kommentar haut's mir die Sidebar nach ganz unten rechts (also außerhalb des content-divs). Siehe hier: Spielen im Unterricht : Ludolingua - Spiele im Fremdsprachenunterricht (Seite mit Kommentar)
Im bisherigen Theme gab es 2 Dateien: page.php und pagecomment.php, die ich einfach mal so übernommen habe. Was mir völlig schleierhaft bleibt, ist, wann und v.a. nach welchem Muster Wordpress auf die pagecomment.php zugreift.
Ich vermute, irgendein DIV zerlegt mir das Layout. Ich finde es aber nicht. Hab nen Validator (HTML Tidy) mal drüberlaufen lassen, aber da shat auch nichts gebracht.
Hier noch die beiden betreffenden Files:
page.php
<?php get_header(); ?>
<div id="content">
<div id="contentleft">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php the_content(__('Read more'));?><div style="clear:both;"></div>
<!--
<?php trackback_rdf(); ?>
-->
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
<?php wp_link_pages(); ?>
<?php comments_template(); // Get wp-comments.php template ?>
</div>
</div>
<?php include(TEMPLATEPATH."/sidebar.php");?>
<!-- The main column ends -->
<?php get_footer(); ?>
Alles anzeigen
pagecomment.php
<?php
/*
Template Name: Seite mit Kommentar
*/
?>
<?php
get_header();
?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h3 class="storytitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<div class="storycontent">
<?php the_content(__('Read more')); ?>
</div>
<div class="meta"><?php the_author() ?>
<?php edit_post_link(__('Edit This')); ?></div>
<div class="feedback">
<?php wp_link_pages(); ?>
<?php comments_popup_link(__('Kommentare (0)'), __('Kommentare (1)'), __('Kommentare (%)')); ?>
<?php comments_template(); // Get wp-comments.php template ?>
</div>
</div>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<?php posts_nav_link(' — ', __('vorherige Seite / previous page'), __('nächste Seite / next page')); ?>
</div>
<?php get_footer(); ?>
Alles anzeigen
Hat jemand von Euch so oft mit Wordpress zu tun, dass er/sie/es den Fehler eventuell sofort sieht? Ich steh aufm Schlauch. :oops:
Danke schonmal und einen schönen Nachmittag!
Fabian