Skip to content

Mstoic

  • Home
  • Start Here!
  • Best Deals
  • Facebook Tricks
  • Privacy
  • Resources
  • TOC
  • Tools
    • Web Tools
      • Stop Watch
      • QR Code Generator
      • Adsense Code Converter
      • Blogger Sitemap Generator
      • Difference Between Two Texts
      • Vacation Checklist
      • Twitter Symbols
      • Count Down
    • Investment
      • SIP Calculator
      • Power of Compounding
      • PPF Calculator
      • FD Calculator
  • About Us

Display Blog Subscribers In WordPress

Editorial Team | July 23, 2014 | Webmasters, Wordpress |

WordPress allows your site visitors to subscribe to your blog to get all the latest articles you publish in their inbox. But some of you may want to show your blog power and decide to display all the subscribers of your blog. Achieving this is not difficult too, just add the below code to your theme file, wherever you want to display your blog subscribers.

<ul class="subscribers"> <?php     $blogusers = get_users('blog_id=1&orderby=display_name&number=100&role=subscriber');     foreach ($blogusers as $user) {          echo '<li>' . $user->display_name . '</li>';     } ?> </ul>

The result will give an unordered list with the subscribers class. You can customize the look by targeting the subscribers class.

Related Articles

  • 15 Best SEO Tips for WordPress Blogs
  • Turn OFF Autosave In WordPress And Reduce Database Size
  • 4 Ways To Enable Gzip Compression In WordPress
  • 22 Things To Do For A Faster WordPress Website
  • Google Authenticator for WordPress

There are many things that can be changed in this query. The number in the blue color is the total number of subscribers it will return. Change it with any number you want. You can also change the role to any accepted value, to display people according to the role you specify. Visit the get_user function page on WordPress codex to see what all can be customized.

Previous Post

Redirect WordPress Feeds To FeedBurner

by Editorial Team

Next Post

Auto Update Plugins And Themes In WordPress

by Editorial Team

Recommended Next
How to View Hidden Files (htaccess) in cPanel

Discussions

  1. Swapnadip Chakraborty
    July 24, 2014 at 18:58

    Thanks Hemant for sharing this subscribe html code here. It will help to increase traffic of your blog. I will definitely use this code to get this facility.

    Reply

Your Comment Cancel reply

Follow Us

Like us Follow us Follow us

Categories

  • Tricks (93)
  • Facebook (83)
  • Tips (76)
  • Windows (67)
  • Wordpress (39)
  • Android (38)
  • Internet (33)
  • Antivirus (30)
  • How To (29)
  • Webmasters (25)
  • Customization (25)
  • Downloads (21)
  • Utilities (21)
  • Gmail (20)
  • Windows 7 (19)

Related Articles

  • Reverse a String using StringBuilder