• Resolved chanel

    (@chanel)


    I want comments on my pages and when I add the following code <?php comments_template(); ?> it makes my sidebar go UNDERNEATH my content. Here is how I coded it on page.php:

    <?php get_header(); ?>
    <div id=”main”>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class=”post”>
    <div class=”post-title”><img src=”https://kisschanel.com/hearts.jpg&#8221; style=”float:left” alt=”” /> ” style=”text-decoration:none;” rel=”bookmark” title=”Permanent Link: <?php

    the_title(); ?>”><?php the_ttftitle(); ?>
    </div>

    <div class=”entrytext”>

    <div align=”justify”><?php the_content(‘<p class=”serif”>Read the rest of this page »</p>’); ?></div>

    <?php link_pages(‘<p>Pages: ‘, ‘</p>’, ‘number’); ?>

    </div>
    </div>
    <?php comments_template(); ?>
    <?php endwhile; endif; ?>

    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    <img src=”https://chanellie.com/footer.jpg&#8221; alt=”” />
    </div>

    Any suggestions or reason why this is happening? I tried moving it to different places but it just makes it worse. My site is chanellie.com

Viewing 14 replies - 1 through 14 (of 14 total)
  • It is most likely a CSS formatting issue, but it is hard for me to tell without seeing the problem in action. If you would like to enable the comments on pages again just for a bit I can take a look.

    Thread Starter chanel

    (@chanel)

    Hi Dagon. Here’s a link to a test page:

    https://chanellie.com/?page_id=131

    The sidebar code needs to be after this:

    </div>
    
    <!-- End #content -->

    Right now, it is directly above it.

    It is trickier for me to see exactly how the template files are structured of course – all I can see is the html output, but that may do the trick. Let me know.

    Thread Starter chanel

    (@chanel)

    Okay. I did that but now there’s the word “No” right next to my navigation. So that solved the sidebar problem. But why is it saying “No”? LOL.

    Thread Starter chanel

    (@chanel)

    <?php get_header(); ?>
    <div id=”main”>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class=”post”>
    <div class=”post-title”><img src=”https://kisschanel.com/hearts.jpg&#8221; style=”float:left” alt=”” /> ” style=”text-decoration:none;” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”><?php the_ttftitle(); ?>
    </div>

    <div class=”entrytext”>

    <div align=”justify”><?php the_content(‘<p class=”serif”>Read the rest of this page »</p>’); ?></div>

    <?php link_pages(‘<p>Pages: ‘, ‘</p>’, ‘number’); ?>

    </div>
    </div>

    <?php endwhile; endif; ?>

    </div>
    <?php get_sidebar(); ?>

    <?php comments_template(); ?>
    <?php get_footer(); ?>

    <img src=”https://chanellie.com/footer.jpg&#8221; alt=”” />
    </div>

    That is quite odd ?? The ‘No’ is coming from the first part of ‘No comments so far’.

    I would think that you would also need the comments_template to be called above the end of the main div.. traditionally something like this is used:

    container
    –main
    —-post stuff
    —-comment stuff
    –sidebar

    But it depends on how your theme is laid out.

    Thread Starter chanel

    (@chanel)

    oh wow @ the “No” coming from that statement, lol.

    As for the rest, I don’t quite understand what you mean. You didn’t see anything odd with the source code I provided above?

    I would try changing it to the code below, but if the floats were done in a particular way, it might not help. Worth a shot though.

    If not, if you wanted to send me your theme files I could test it out on my server and get it working.

    <?php get_header(); ?>
    <div id="main">
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div class="post">
    <div class="post-title"><img src="https://kisschanel.com/hearts.jpg" style="float:left" alt="" /> " style="text-decoration:none;" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_ttftitle(); ?>
    </div>
    
    <div class="entrytext">
    
    <div align="justify"><?php the_content('<p class="serif">Read the rest of this page ?</p>'); ?></div>
    
    <?php link_pages('<p>Pages: ', '</p>', 'number'); ?>
    
    </div>
    </div>
    
    <?php comments_template(); ?>
    
    <?php endwhile; endif; ?>
    
    </div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
    
    <img src="https://chanellie.com/footer.jpg" alt="" />
    </div>
    Thread Starter chanel

    (@chanel)

    yeahhhh, I just tried that code and it still didn’t work.

    What’s your email address so I can email you the zip file of the theme?

    matt at
    dagondesign dot com

    Thread Starter chanel

    (@chanel)

    ok. my email is chanellies
    at gmail dot com.

    I just sent it.

    It looks like not only did it have to be placed in the proper area, but it also needed an extra closing div after it, due to the code in the comments file.

    That should work ?? It works for me at least.

    Thread Starter chanel

    (@chanel)

    Dagon, you’re my hero. It worked. I can’t believe you got it in 5 minutes versus my 5 HOURS of trying to figure it out.

    Sadness everywhere.

    But thank you so much!

    No problem ??

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Comments On Pages’ is closed to new replies.