X

Number of blogroll bookmarks

Adding this PHP code to your wordpress theme will display the total number of bookmarks.


<?php $numlinks = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->links WHERE link_visible = 'Y'");
if (0 < $numlinks) $numlinks = number_format($numlinks); ?>

<?php 
          echo $numlinks; 
?>

Comments  Leave a Reply

  1. Thanks for this, definitely pointing me in the right direction for what I am brewing up. 

  2. Tweets that mention Wordpress Number of blogroll bookmarks – wpsnipp.com Wordpress code snippets for your blog -- Topsy.com November 19, 2010 at 10:03 am

    […] This post was mentioned on Twitter by wphonors, WPSNIPP. WPSNIPP said: #wordpress Number of blogroll bookmarks http://bit.ly/cSpJTa #blog please RT 🙂 […]

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!