[resolved] How to add line between recent posts? (4 posts)

  1. Will Taft
    Posted 9 years ago #

    Below is the code from my sidebar.php file that displays recent posts. I think if I change the number 12 to say, 6, I can reduce the number of posts shown.

    What would I need to do to add a line between each post listing? As it is now, some post titles display on two lines, others on one. It would be easier to see the distinction between posts if there was a blank line between each one. Thanks!


      <?php get_archives('postbypost','12','custom','
    • ','
    • '); ?>
  2. You should be using wp_get_archives() instead:


    To add a blank line or anything else, you can use the before and after parameters. Like so:


    And so on. Just make before and/or after = the html you want to insert there.

  3. Will Taft
    Posted 9 years ago #

    Thanks. This is what I changed it to and it works, except it does not put in the line space. Can you see my mistake?


  4. except it does not put in the line space

    What, exactly, is a "line space"? It's hard to understand what you want when you use non-standard terms.

    The <br/> adds a line break. Maybe you want it to add two of them? Like <br/><br/> or something? I don't know what you want until you explain it better.

    Or, it might be easier if you simply gave us a link to the page itself so we can see the results and see what you're talking about.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.