Hallo!
Ich habe Beiträge über eine statische Seite angezeigt.
Leider funktioniert die Kommentarfunktion nicht mehr. Ich komme einfach nicht drauf.
Bin über jeden Hinweis dankbar!
Vielen Dank!
Hier der Quelltest der page.php:
PHP
<?php /* Template Name: Diskussion */ ?> <?php
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages and that
* other 'pages' on your WordPress site will use a different template.
*
* @package WordPress
* @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0
*/
get_header(); ?>
<div id="main-content" class="main-content">
<?php
if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
// Include the featured content template.
get_template_part( 'featured-content' );
}
?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php query_posts('category_name=Allgemein'); ?>
<?php
// Start the Loop.
while ( have_posts() ) : the_post();
// Include the page content templ nt', 'page' );
get_template_part( 'content', get_post_format() );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
endwhile;
?>
</div><!-- #content -->
<div id="kommentarspalte">
<?php if (function_exists('vote_poll') && !in_pollarchive()): ?>
<ul>
<li><?php get_poll();?></li>
</ul>
<?php endif; ?>
<?php query_posts('category_name=Kommentar'); ?>
<?php
// Start the Loop.
while ( have_posts() ) : the_post();
// Include the page content template.
get_template_part( 'content', get_post_format() );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
endwhile;
?>
</div>
</div><!-- #primary -->
<?php get_sidebar( 'content' ); ?>
</div><!-- #main-content -->
<?php
get_sidebar();
get_footer();
Alles anzeigen