• 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; ?>

    <h1>Comments</h1>
    <?php comments_template(); // Get wp-comments.php template ?>
    </div>
    <hr />
    </div>

    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.

    Thanks

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.

    Thread Starter anxo69

    (@anxo69)

    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??

    try

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

    Thread Starter anxo69

    (@anxo69)

    nope no go.

    my address is http://www.markarcaro.com too.

    just wondering why the <hr />

    Why not just <hr>

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

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

    But since i’m dumb 🙂
    This might help:
    http://wordpress.org/support/topic/136220?replies=4

    Thread Starter anxo69

    (@anxo69)

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

    Thread Starter anxo69

    (@anxo69)

    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.

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

    [CSS]
    .clearfloat{
    clear:both;
    }
    .border_bottom{
    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
    img{float:left}
    to my thumbnail images in posts.
    ‘Clearing’ brings the rule below the thumbnail image.

    >carlscape101
    <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.