Forums

Comments are displayed in the wrong page (1 post)

  1. Chrisinthedark
    Member
    Posted 7 months ago #

    Hello, I have a strange problem...

    Comments are displayed in the wrong page of single posts.

    Here is the code for single.php

    <?php
    /**
     * The Template for displaying all single posts.
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    
    get_header(); ?>
    
    		<div id="primary">
    			<div id="content" role="main">
    
    				<?php while ( have_posts() ) : the_post(); ?>
    
    <!-- <h2><?php single_post_title('Current post: '); ?></h2> -->
    
    					<nav id="nav-single">
    						<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
    						<span class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">&larr;</span> Previous', 'twentyeleven' ) ); ?></span>
    						<span class="nav-next"><?php next_post_link( '%link', __( 'Next <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?></span>
    					</nav><!-- #nav-single -->
    
    					<?php get_template_part( 'content', 'single' ); ?>
    
    <div style="margin-bottom: 110px;">
    					<div style="float: left;">
    					<div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) {return;}
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    
    <fb:like href="<?php the_permalink(); ?>" send="false" layout="button_count" width="100" show_faces="true" colorscheme="dark" font="tahoma"></fb:like>
    					</div>
    					<div style="float: left; padding-bottom: 2px;">
    						 <span style="color: #ffffff; font-family: 'GrauBlauWeb';"><<< Questo articolo ti รจ risultato utile? Condividilo su Facebook!</span>
    					</div>
    
    				</div>
    
    <div>
    
    <h3 style="color: #FFFFFF;
        font-family: GrauBlauWeb;
        font-weight: bold;
        margin-bottom: 10px;
        text-decoration: underline;
        text-transform: uppercase;">Ti potrebbe anche interessare:</h3>
    <ul>
    <?php $posts = get_posts('orderby=rand&numberposts=5'); foreach($posts as $post) { ?>
    <li style="list-style: none; margin-bottom: 5px;"><?php the_post_thumbnail( array(40,40) ); ?><a style="color: #ffffff; font-family: 'GrauBlauWeb';" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
    </li>
    <?php } ?>
    </ul>
    </li>
    </div>
    
    			<?php comments_template( '', true ); ?>
    
    				<?php endwhile; // end of the loop. ?>
    
    			</div><!-- #content -->
    		</div><!-- #primary -->
    <?php get_sidebar() ?>
    <?php get_footer(); ?>

    How can I do?

    Thanks

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 7 months ago by Chrisinthedark
  • This topic is not resolved
  • WordPress version: 3.2.1