wp list bookmarks formatting
-
Hello all,
Just a question concerning the wp_list_bookmarks() function. On the bottom right of this blog are displayed “Useful Links”, which are user input links from the link tab on the WP dashboard, and are called using wp_list_bookmarks(). Now as you can see, for example with Aotearoa New Zealand Evaluation Association, it is a single link, but the string is longer so it breaks to a second line.
Sidebar source:
<div id="sidebar"> <div id="contact"> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/ContactMathea.png" width="220" height="36" /> <h4>Address</h4> <p>PO Box 5694 <br /> Lambton Quay <br /> Wellington 6145 <br /> New Zealand</p> <h4>Phone</h4> <p>+64 4 971 9981</p> <h4>Mobile</h4> <p>+64 27 281 2774</p> <h4>Email</h4> <a href="mailto:[email protected]">[email protected]</a> </div> <div class="blogsidebar"> <?php if ($atpage=="Blogpage"){ $args=array('title_li'=> '<h4>Categories</h4>','hide_empty'=>0,'orderby' => 'ID','exclude' => 1); wp_list_categories($args); ?> <h4 class="archives">Archives</h4> <?php $args=array('type' => 'monthly','limit' => 12); wp_get_archives($args); ?> <a href="<?php bloginfo('url'); ?>/archive">See older entries</a> <h4>Recent Entries</h4> <?php $args = array('numberposts'=>5); $myposts = get_posts($args); $first=true; foreach($myposts as $post){ ?> <ul> <li><a href="<?php echo($post->guid); ?>"><?php the_title(); ?></a></li> </ul> <?php } $args=array('categorize'=>0,'title_li'=> '<h4>Useful Links</h4>'); wp_list_bookmarks($args); } ?> </div> </div>
The problem is that, even though it’s the same string, when it breaks to the next line it has the same line-spacing as a single line link would have, which makes it troubling for the user to decided if it’s the same link or if they are seperate. So my question is asking if there is a way to reduce line spacing or padding for strings that go over one line?
Many thanks.
- The topic ‘wp list bookmarks formatting’ is closed to new replies.