• dydric

    (@dydric)


    Hi, I’ve tried to put the comments inline with my posts but it didn’t worked. Does anyone knows how to put the comment text (no comments, 1 comment, %comments) directly behind/after my posts?

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter dydric

    (@dydric)

    this is a part of how my index.php templatefile is look like now:

    <div class=”post”>
    <h3 class=”storytitle” id=”post-<?php the_ID(); ?>”><?php the_date(”,'<h2>’,'</h2>’); ?></h3>
    <?php the_content(‘More…’); ?><?php wp_link_pages(); ?><?php comments_popup_link(‘comments (0)’, ‘comments (1)’, ‘comments (%)’, ‘comments-link’, ”); ?>
    </div>

    easilyi

    (@easilyi)

    oops, sorry, i may be back to fix this post… 🙂
    ***
    ok, since i messed up by posting here in the first place, i thought i should give my thoughts.

    i don’t know where those functions are located, (the ones you postes above from your index.php) but would it make sense to find those functions and see if there is formatting, like or something, that makes it so whatever you put next is after the closing and will always be on a new line?

    sorry if this is not much help, just thought if the CSS does not change anything that looking at the functions might be a good idea…

    Thread Starter dydric

    (@dydric)

    I searched in all the function-pages but I don’t know where to start. btw thx you are thinking with me…

    Ming

    (@ming)

    This might be the easiest way for you to do this:

    Where you display <?php the_content(); ?> replace it with this:

    <p><?php remove_filter('the_content', 'wpautop'); ?><?php the_content(); ?><?php comments_popup_link('comments (0)', 'comments (1)', 'comments (%)', 'comments-link', ''); ?></p>

    wpautop() is the function that adds paragraph tags in your posts. The line remove_filter('the_content', 'wpautop') removes paragraph formating from ‘the_content’. We’ve wrapped the whole thing in our own <p> tags so look of the page should be the same (mostly, hopefully! 😉

    Thread Starter dydric

    (@dydric)

    thanks a lot! It works perfectly!!!

Viewing 5 replies - 16 through 20 (of 20 total)

The topic ‘comments directly behind posts’ is closed to new replies.