Number of blogroll bookmarks

Wpsnipp – Quick WordPress tip for you today! A reader recently asked about displaying the total number of blogroll bookmarks on their site.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;
?>

Be Sociable, Share!

Leave a comment