Order WordPress Users by Random

We can use the get_users() to get a list of authors, users with specific role, user with specific meta, etc. The function returns users which can be ordered by ID, login, nicename, email, url, registered, display_name, post_count, or meta_value. But there is no random option such as what get_posts() function provides to shows posts randomly.

Top 10 Free WordPress Countdown Plugins

The countdown functionality can easily be added to your site. With counting down and up functionality, gives you a full control to your counter. This plugin comes with multi-instances sidebar widget, packed with bunch of options. All styles and scripts area pulled in the header section. Every each counter have their own selector that enables you to create spesifics style or script to the selector.

10+ Essential WordPress User Role Plugins

By default WordPress provides subscriber, contributor, author, editor, administrator role. These roles grant same or different access for some site features such as creating new post, uploading media, deleting post, managing post, managing option etc. For site that enable the registration feature, a new registered user will be assigned to subscriber role which only have read capability. A site administrator can change their roles to other role. Here are the list of the best WordPress roles plugins, for creating roles, deleting, change or add roles capability.

Block Several Email Domains from WordPress Registration

There are many spammers out there trying to register account on WordPress site installation. We don’t know if the spam is a human or bot machine. There is no a perfect way for combating the spammers even by using CAPTCHA, email confirmation, logical questions, and many several process of registration functions. This tutorial will give a basic explanation on how to block several email domains from registering account on WordPress based site.

WordPress Get Total Comment Count

WordPress has builtin function wp_count_comments to count total comments for a given post id or all comments. The function will return totals of moderated, approved, spam, trash, post-trashed and total_comments. But we can’t use the function for special case like if we want to result total comments for single and multiple category or tag. We should build our own database queries to get the results. Below are code snippets collection to get the total post or site comments and some special cases.

WordPress Comment Form with Twitter Bootstrap 3 Supports

WordPress has a builtin function comment_form to output a complete commenting form for use within a template. We can copy the function and create custom styles for our need. But instead of creating a new function, we can use WordPress filter and action to change it. The main idea of this post is to add Bootstrap 3 supports for the generated comment form by changing the form classes and layout. We will use this Bootstrap example because it is pretty much similar with the WordPress comment form. All the codes below can be paste in the current theme functions.php.

Create Back To Top Button For WordPress

Imagine we read a long post content and when we almost at the bottom of the page, it can be very useful if there is a link or button we can click to go back or scroll to top. We can use the scroll to go to the top, but this is not a good way for very long content. Here is how to create the back to top link without plugin or editing current template files. We will use smooth scrolling effect with jQuery for better user experience to avoid shocking.

The Best WordPress Plugin for Table of Contents

For a long post content, it is better if we use table of contents to map our article section. Using headings as the content section title will help our reader known what they read. There are many WordPress plugins that create automatic table of contents with standard or extensive features. This article lists the best WordPress plugin for creating table of contents. We will review it by feature, the ease to use, and performance.

Get the First Paragraph as an Excerpt for WordPress

WordPress by default will generate the auto excerpt from the content with 55 words and if the amount is greater than that, then the string ‘[…]’ will be appended to the excerpt. If the string is less than 55 words, then the content will be returned as is. In other case, if manual excerpt was added to the post, it will be used as is instead of creating the 55 words.

How to Set and Get or Delete Cookies with WordPress

This is an article about WordPress. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. The cookies are used to store data for logged in users and for commenter after you create a comment for a post or page. WordPress provides built-in functions to store authentication data such as wp_set_auth_cookie() and wp_clear_auth_cookie() or auth_redirect().