Support » Fixing WordPress » Trying to put a line between post

  • Hello, Im trying to put a line between my post. Ive read a couple ways but cant seen to make it work.

    Here is my main index php post section:

    <div id=”contentleft”>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h1>” rel=”bookmark”><?php the_title(); ?></h1>
    <?php the_time(‘F jS, Y’); ?>
    <p>Filed Under <?php the_category(‘, ‘) ?></p>

    <?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 comments_template(); // Get wp-comments.php template ?>
    <hr />

    can somebody tell me where I put the <hr /> to make a line show up after all post?

    Also where is the can I put the custom style code for the hr anywhere in my css? I was going to put it at the bottom.

    Id like the line to be like 2px light grey.


Viewing 10 replies - 1 through 10 (of 10 total)
  • The code for a line is <hr> forget about the /

    Sorry don’t forget i read it like /hr

    try putting it after this

    <?php the_content(__('Read more'));?><div style="clear:both;"></div>

    and you can put the new class anywhere in your css.

    Thanks boober, I tried it and no luck. Its weird.

    Ive tried, example:

    <?php the_content(__(‘Read more’));?><div style=”clear:both;”></div><hr />

    and example

    <?php the_content(__(‘Read more’));?><div style=”clear:both;”></div>
    <hr />

    could I have a block somewhere??


    <?php the_content(__('Read more'));?><hr /><div style="clear:both;"></div>

    nope no go.

    my address is too.

    just wondering why the <hr />

    Why not just <hr>

    (I do get confused now and then)
    but I thought horizontal rule was

    I know i’m making myself look like an idiot here but..

    But since i’m dumb 🙂
    This might help:

    thanks carlscape101- I tried the <hr> in the same places as we said earlier and still no luck. So IDK. it is stumping me.

    hey I just tried to put it in my home.php and it worked!

    boober’s method works for me too.
    But instead of using an <hr> tag, I use CSS to add the rule so that I can style it more freely.

    <?php the_content(__(‘Read more’));?>
    <div class=”clearfloat border_bottom”></div>

    border-bottom:1px #e2e2e2 solid;

    *This adds a light gray thin rule below each post.
    Have it on top, dotted, thick, double, red…you can change the style as you like.

    *I am using clear:both because I have a style
    to my thumbnail images in posts.
    ‘Clearing’ brings the rule below the thumbnail image.

    <hr> is an html tag and <hr /> is an xhtml tag. In XHTML the <hr> tag must be properly closed. I’m not sure, but I think WordPress supports XHTML?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Trying to put a line between post’ is closed to new replies.