Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Apr 2008
    Posts
    46
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Category/Comment format

    I have this
    PHP Code:
    <p>Posted <?php the_time('m.d.y'?> in <?php the_category('separator''parents'); ?> <span>|</span> <?php comments_popup_link('0 Comments''1 Comment''% Comments'); ?><?php edit_post_link('Edit'''); ?></p>
    And the "|" is displayed near my category when that is the only link at the top under my header. How do I remove the "|" when there isn't a second link?

  • #2
    Regular Coder BWiz's Avatar
    Join Date
    Mar 2006
    Location
    Sol System
    Posts
    471
    Thanks
    7
    Thanked 21 Times in 21 Posts
    I would do it two ways:
    1) My preferred way would be to find some method of counting how many links there are going to be before anything is displayed, and if there is more than one link, then I would just use an if statement and print it.
    2) Maybe you should try to incorporate the "|" into the "echo" or "print" statements of the functions, so it'll print alongside the link.
    BWiz :: Happy Coding!
    2006
    2007 2008 2009
    2010 2011
    Irrational numbers make no sense.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •