SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    May 2005
    Location
    London, ON
    Posts
    360
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    BlogRoll Inserting and extra <br>

    Hello,

    If you look at my blog here: http://www.ryanprice.ca/blog/ you'll notice that the blogroll (right hand side, scroll down a bit) is outputting extra spaces.

    When I have a description of the blog its linking to, the description appears here. Is there a way to take these away?

    I looked into the function and it appears that it has a paramter called "before" which is auto-set to <br /> if its not changed. I still want the break happening so that the links change, but I don't want the "Description" field showing at all... anyone else experienced this problem?

    Thanks in advance.
    Ryan Price
    Subscribe to my blog for regular tips and tricks

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    The problem is the links in that list are all in one <li></li> and each one has the <br /> (line break) after it. Try this instead and see if it displays the way you want:
    PHP Code:
    <?php get_links('<li>''</li>',''false'length'false,false10falsetrue); ?>
    If not repost and I will try again.

    Also if needed see this page to set the parameters to your liking.

    Hope it helps.

  3. #3
    SitePoint Addict
    Join Date
    May 2005
    Location
    London, ON
    Posts
    360
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Beauty, it worked. I was using a different function before. Just in case someone stumbles on this thread later here is what I had before & after:

    BEFORE:
    PHP Code:
    <div id="sidebar">

    <div class="navigation">
    <h1>Navigate</h1>
    <ul>
    <li><a href="<?php echo get_settings('home'); ?>/">Home</a>
    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?></li>
    </ul>

    <h1>Categories</h1>
    <ul>
    <li><?php wp_list_cats(); ?></li>
    </ul>

    <!-- THIS IS WHERE THE PROBLEM WAS -->
    <h1>Other Blogs</h1>
    <ul>
    <li><?php wp_get_linksbyname('Blogroll'?></li>
    </ul>

    <h1>Archive</h1>
    <ul>
    <li><?php wp_get_archives('type=monthly'); ?></li>
    </ul>
    </div>
    <div class="clearer"><span></span></div>


    </div>
    AFTER:
    PHP Code:
    <div id="sidebar">

    <div class="navigation">
    <h1>Navigate</h1>
    <ul>
    <li><a href="<?php echo get_settings('home'); ?>/">Home</a>
    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?></li>
    </ul>

    <h1>Categories</h1>
    <ul>
    <li><?php wp_list_cats(); ?></li>
    </ul>


    <!-- ALL FIXED... thanks JOHNNY GULAG -->
    <h1>Other Blogs</h1>
    <ul>
    <?php get_links(2'<li>''</li>',''false'length'false,false10falsetrue); ?> 
    </ul>

    <h1>Archive</h1>
    <ul>
    <li><?php wp_get_archives('type=monthly'); ?></li>
    </ul>
    </div>
    <div class="clearer"><span></span></div>


    </div>
    Ryan Price
    Subscribe to my blog for regular tips and tricks


Bookmarks

Posting Permissions

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