Affichage des articles dont le libellé est Users. Afficher tous les articles
Affichage des articles dont le libellé est Users. Afficher tous les articles

samedi 12 novembre 2016

How to Show Total Number of Registered Users in WordPress



Have you ever wanted to show the total number of registered users on your WordPress site? Social proof like showing the number of registered users on your site, encourages others to register as well. In this article, we will show you how to show total number of registered users in WordPress.


How to Show Total Number of Registered Users in WordPress


Method 1: Show Registered User Count Using a WordPress Plugin


First thing you need to do is install and activate the Simple Blog Stats plugin. For more details, see our step by step guide on how to install a WordPress plugin.


Upon activation, you need to visit Settings » Simple Blog Stats page to configure plugin settings.


Settings page for Simple Blog Stats


This plugin allows you to show different stats from your WordPress site. You need to click on the shortcodes tab to expand it and then scroll down to the ‘number of users’ row.


Users shortcode settings


You will see the shortcode [sbs_users] with two text fields on both sides. These text fields contain HTML the plugin will add before and after the number of users.


By default, the shortcode will output HTML like this:



<span class="sbs-count-users">856</span>

If you are unsure, then just copy the shortcode [sbs_users] and click on the save settings button.


You can now add this shortcode to any WordPress post or page. You can also add it to a sidebar widget. If the shortcode does not work in the widget, then follow instructions in our guide on how to use shortcodes in your WordPress sidebar widget.


Method 2: Manually Show Number of Registered Users in WordPress with Code


This method requires you to add code to your WordPress site. If you haven’t done this before, then see our beginner’s guide on pasting snippets from web into WordPress.


You need to add the following code to your theme’s functions.php file or a site-specific plugin.



// Function to return user count
function wpb_user_count() {
$usercount = count_users();
$result = $usercount['total_users'];
return $result;
}
// Creating a shortcode to display user count
add_shortcode('user_count', 'wpb_user_count');

This code creates shortcode [user_count] which you can use in your WordPress posts, pages, or a sidebar widget to display the user count.


The function does not add any HTML formatting to the user count and simply returns the number. You may want to wrap the shortcode around HTML to use CSS or basic HTML formatting. For example:



<p>Join <strong>[user_count]</strong> other users who share your interest:</p>

Here is how it looked on our demo site:


Showing total number of users in WordPress widget


Note: We added a free signup button that redirected to a custom WordPress user registration page.


That’s all, we hope this article helped you learn how to show the total number of registered users in WordPress. You may also want to see our guide on how to moderate new user registrations in WordPress.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


The post How to Show Total Number of Registered Users in WordPress appeared first on WPBeginner.







How to Send Email to All Registered Users in WordPress



Have you ever wanted to send a mass email to all registered users on your WordPress site? f you run a multi-user WordPress site, then sometimes you may need to send notifications emails to your users. In this article, we will show you how to send email to all registered users in WordPress.


Email all registered users in WordPress


Why and When You Need to Send Email to All Registered Users in WordPress?


If you allow user registration on your WordPress site, then you may be automatically adding registered users to your email list as well.


In case you are not adding your registered users in an email list, or your email list is not segmented, then you would need an alternative solution to send a mass email to all registered users.


You can use this feature to send emails about important announcements, account status, password update requests, and more.


Let’s see how you can easily email all registered users on your WordPress site.


Sending Email to All Registered Users in WordPress


First thing you need to do is install and activate the Email Users plugin. For more details, see our step by step guide on how to install a WordPress plugin.


Upon activation, the plugin will add a new menu item labeled ‘Email User’. Clicking on it will take you to the page where you can choose who you want to email.


Email users


You can send individual message to specific users, or you can send a message to user groups. Users with the same user role have the same user group for example, administrators, editors, authors, subscribers, etc.


You need to click on ‘Send Individual Message’ link to send email to specific or all users on your WordPress site.


Sending emails to individual or all users on your site


Start by selecting a mail format for your email and then select recipients from the drop down list. You can use the CTRL (Command key on Mac) to select multiple users.


Next, you need to add a subject line and your email message. Once you are satisfied with the email message, click on the Send Email button.


The plugin will send your email message to all selected users.


Sending Email to User Groups in WordPress


User Email plugin also comes with a feature that allows you to send emails to specific user roles.


This feature is helpful if you have a lot of users, and you can’t select them all one by one in the individual message form. It is also helpful when you just want to email specific user roles like authors or editors.


You will need to visit Email Users » Send to Group(s) page.


Send email to specific user roles or groups


First you need to select a mail format (Plain text or HTML) for your email message. After that you can select which user roles or groups you want to send this email to.


Next, add a subject for your email message and then add the email message that you want to send. Click on the Send Email button to send the message.


Turning Emails On/Off for Specific Users in WordPress


You can select which users will receive individual or group messages by visiting the Email Users » User Settings page.


Manage email settings for users


Select the user you want to edit and then select an action from bulk actions menu. You can turn off notifications (individual messages) as well as mass emails (emails sent to multiple users or user groups).


When you have made your changes, make sure to click on the apply button to save your changes.


Individual users on your site can control email settings on their profile pages as well.


Upon login, users can go to their Profile page, and they will notice two new options to opt-in or out of email messages.


Email preferences


Troubleshooting Email Issues


If you are having problems sending email from your WordPress website, then see our guide on how to fix WordPress not sending email issue.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


The post How to Send Email to All Registered Users in WordPress appeared first on WPBeginner.







Basics of Inspect Element: Customizing WordPress for DIY Users



Have you ever wanted to temporarily edit a webpage to see how it would look with specific colors, fonts, styling, etc. It’s possible with a tool that already exists in your browser called Inspect Element. This is a dream come true for all DIY users when they find out about it. In this article, we will show you the basics of inspect element and how to use it with your WordPress site.


WordPress beginner's guide to using Inspect tool in Google Chrome


What is Inspect Element or Developer Tools?


Modern web browsers like Google Chrome and Mozilla Firefox has built-in tools which allow web developers to debug errors. These tools show the HTML, CSS, and JavaScript code for a page and how the browser executes the code.


Using Inspect Element tool, you can edit HTML, CSS, or JavaSCript code for any webpage and see your changes live (only on your computer).


For a DIY website owner, these tools can help you preview how a site design would look without actually making the changes for everyone.


For writers, these tools are awesome because you can easily change personal identifying information when taking your screenshots eliminating the need to blur out items altogether.


For support agents, it’s a great way to identify the error that could be causing your galleries to not load or your sliders to not work properly.


We’re just scratching the surface of use-cases. Inspect element is really powerful.


In this article, we will be focusing on Inspect Element in Google Chrome because that’s our browser of choice. Firefox has its own developer tools which can also be invoked by selecting inspect element from browser menu.


Ready? Let’s get started.


Video Tutorial



If you don’t like the video or need more instructions, then continue reading.


Launching Inspect Element and Locating The Code


You can launch inspect element tool by pressing CTRL + Shift + I keys on your keyboard. Alternately you can click anywhere on a web page and select inspect element from browser menu.


Inspect menu


Your browser window will split into two, and the lower window will show the web page’s source code.


The developer tool window is further divided into two windows. On your left, you will see the HTML code for the page. On the right-hand pane, you will see the CSS rules.


HTML and CSS Panes in Inspect window


As you move your mouse over the HTML source you will see the affected area highlighted on the web page. You will also notice CSS rules change to show the CSS for the element you are viewing.


Editing a particular HTML element


You can also take the mouse pointer to an element on the web page, right click and select inspect element. The element you pointed at will be highlighted in the source code.


Editing and Debugging Code in Inspect Element


Both the HTML and CSS in the inspect element window are editable. You can double click anywhere in the HTML source code and edit the code as you like.


Editing HTML code in inspect element tool


You can also double click and edit any attributes and styles in the CSS pane. To add a custom style rule click on the + icon at the top of CSS pane.


Editing CSS in the inspect element tool


As you make changes to the CSS or HTML those changes will be reflected in the browser instantly.


Live CSS changes in the browser screen


Note, that any changes you make here are not saved anywhere. Inspect element is a debugging tool, and it does not write your changes back to the files on your server. This means that if you refresh the page, all your changes will be gone.


To actually make the changes, you will have to edit your WordPress theme’s stylesheet or relevant template to add the changes you want to save.


Before you start editing your existing WordPress theme using Inspect Element tool, make sure you that you save all your changes by creating a child theme.


Easily Find Errors On Your Site


Inspect element has an area called Console which shows all the errors that exist on your website. When trying to debug an error or requesting support from plugin authors, it’s always helpful to look here to see what the errors are.


Browser Console Error


For example, if you were an OptinMonster customer wondering why your optin is not loading, then you can easily find the problem “your page slug does not match”.


If your sharebar wasn’t working properly, then you can see that there’s a JavaScript error.


Tools like the Inspect Element Console and SupportAlly help you get better customer support because the technical support team love customers who take initiative in providing detailed feedback of the issue.


We hope this article helped you learn the basics of inspect element and how to use it with your WordPres site. You may also want to take a look at the default WordPress generated CSS cheat sheet to speed up your theme development skills.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Google+.


The post Basics of Inspect Element: Customizing WordPress for DIY Users appeared first on WPBeginner.







How to Allow Users to Subscribe to Authors in WordPress



Have you ever wanted to allow users to subscribe to specific authors in WordPress? If you run a multi-author WordPress site, then your users may want to subscribe to their favorite author. In this article, we will show you how to allow users to subscribe to individual authors in WordPress.


Subscribe to author


Why Add Subscribe to Authors in WordPress?


Most large multi-author blogs like Huffington Post allow users to follow their favorite authors. You can offer this feature in your multi-author WordPress site as well.


WordPress generates RSS feeds for all authors, categories, tags, custom post types, and comments on your site. However, your users can’t see these feeds link without knowing where to look.


As a site owner, you just need to add links and subscription options so that users can subscribe to authors.


Having said that, let’s take a look at how to allow users to easily subscribe to authors in WordPress.


Adding Subscribe to Authors Feature in WordPress


All the authors on your WordPress site have an RSS feed of their own. This RSS feed is located at a URL like this:


http://www.example.com/author/tom/feed/


Don’t forget to replace ‘tom’ with an existing author’s name on your site.


Many WordPress themes come with a section that displays author’s biographical information at the end of the article. You can add this HTML code in an author’s bio section to display a link to their RSS feed.



<a href="http://www.example.com/author/tom/feed">Subcribe Tom's Posts</a>

Adding a subscribe to author link in author bio section


You can also automatically generate the link and use a shortcode to manually insert it into posts.


First you need to add this code to your theme’s functions.php file or a site-specific plugin.




// Function to generate author's RSS feed link

function wpb_author_feed() {

$authorfeed = get_author_feed_link( get_the_author_id(), '');

$authorfeedlink = '<a href='. $authorfeed . '>Subscribe to get more posts from ' . get_the_author_meta( 'display_name') .'' ;

return $authorfeedlink;

}
// Create a shortcode to display the link
add_shortcode('authorfeed', 'wpb_author_feed');

// Enable shortcode execution in WordPress text widgets
add_filter('widget_text', 'do_shortcode');


You can now just use the shortcode [authorfeed] in your posts, and it will automatically generate a link to the post author’s RSS feed. Feel free to customize the text you want to display for the link.


Subscribe to author link


Add a Subscribe to Author Link in the Sidebar


We will be using the shortcode method we showed above to display a subscribe to author link in the sidebar of your WordPress blog. Simply go to Appearance » Widgets page and add a text widget to your sidebar.


Adding subscribe to author link in WordPress sidebar widget


You will need to add [authorfeed] shortcode in the text area of the widget. After that, don’t forget to click on the save button to store widget settings.


You can now visit your website to see the sidebar in action.


The problem with this method is that it will display the widget on every page including the homepage, category, and tag archives, etc.


You need to install and activate the Display Widgets plugin. For more details, see our step by step guide on how to install a WordPress plugin.


Upon activation, you need to visit the Widgets page and edit the author’s feed widget you added earlier.


Display widget rules


You will notice new options to control widget display on different pages of your site. Now you need to select ‘Show on checked pages’, and then check the single post option.


Don’t forget to click on the save button to store your widget settings.


That’s all you can now visit your website to see your author subscription link in action. You can use a little CSS to create a button, or add an image icon as the subscription.


We hope this article helped you learn how to allow users to subscribe to authors in WordPress. You may also want to see our guide on how to fix most common RSS feed errors in WordPress.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


The post How to Allow Users to Subscribe to Authors in WordPress appeared first on WPBeginner.







11 Email Marketing Mistakes WordPress Users Must Avoid



Thinking about building an email list? Beginner’s often end up making email marketing mistakes that are detrimental to their business. In this article, we will share 11 email marketing mistakes that all WordPress users must avoid.


Email Marketing Mistakes to Avoid


1. Using WordPress to Run an Email List or Newsletter


WordPress is a robust platform with built-in capability to send email notifications. However, it was not designed to send out email newsletters.


There are plenty of WordPress plugins that allow you to send out newsletter without signing up for an email marketing service. Using such a plugin to build your email list is a terrible idea.


First, your WordPress hosting provider would consider this as a misuse of their terms and service. These mail servers are often poorly configured, have strict limits, and cannot send all your emails at once.


Almost all users who start out with a WordPress plugin or an email script, end up signing up with a proper email marketing service. The switch affects their existing subscribers as many email service providers will ask them to opt-in again.


If you haven’t already done so, then it is time to signup with a reputable email service provider like Constant Contact, AWeber, etc. This will ensure that you don’t lose any email address and that your emails always land into user’s inbox.


For more on this topic, take a look at our article on why you should never use WordPress to send newsletter emails.


2. Confusing Blog Subscription Tools with an Email List


Confusing email list with blog subscription tools


Another common misconception among WordPress users is confusing blog subscription tools with an email list.


Plugins like JetPack or services like Feedburner allow your users to receive blog posts via email. However, this is not really an email list.



  • You cannot send out private email newsletters to your users with these tools.

  • You do not own your contacts list.

  • There are no contact-management, advanced analytics, or any other features

  • You cannot effectively use such tools to capture more email subscribers


For more on this topic, you may want to see our guide on how to switch from JetPack subscription to MailChimp, Aweber, etc.


3. Not Starting Email List Building Right Away


Missing out by not starting early


Many small businesses and bloggers don’t realize how important it is to use email marketing. They keep adding new content and reach out to audiences on social media, while ignoring the most cost effective marketing tool at their disposal.


Almost 75% visitors coming to your website from search engines will never come back again. Building an email list allows you to reach out to your users, bring them back, and boost your sales.


If you haven’t already started building your email list, then check out our article about why you should start building your email list right away.


4. Not Using a Lead Generation Software


Lead generation


Many users complain that their email list is not growing fast enough or that users are not signing up at all. Some users rely purely on guess work on what would work on their site.


You need to use a lead generation software like OptinMonster to quickly grow your email list. OptinMonster helps you convert abandoning website visitors into email subscribers. See our case study of how we increased our email subscribers by 600% using OptinMonster.


5. Using only a Single Sign up Form


Many bloggers and small business owners just place a signup form on their website and then forget about it. Your users have a shorter attention span, and unless you are a celebrity, most users will probably not even notice your signup form.


You will need to improve your lead generation by placing multiple optin forms at strategic locations. Using OptinMonster, you can use smart popups, slide in forms, after post optins, and many more ways to make your email signup forms more noticeable.


6. Using Too Many Optins and Ruining User Experience


Confusing users with too many choices


While using multiple optins boosts your email signups, using too many optins can have an adverse effect as well. You need to find a balance between a reasonable number of optins and good user experience.


For example, using a popup form, slide in optin, welcome gate, together on the same page can annoy your users. Bad user experience not only discourages users from browsing your website, it can also have a negative effect on your sales and SEO.


We recommend having a combination of a static form (sidebar or inline) and a dynamic form (slide-in, welcome gate, or popup).


7. Not Improving Lead Generation with Testing and Research


Using blind guesses instead of testing and research


Often users turn on a sign up form and then leave it to be.


Without proper strategy and testing, your growth will be stagnant.


You need to regularly check which optins are working on your website and run A/B tests to see how you can improve.


8. Not Using RSS to Email Subscription


RSS to email subscription


Collecting email addresses alone is not going to do anything for your business, unless you use it to engage with your users. You need to send emails to your users and stay in touch with them.


Connecting your blog’s RSS feed to your email list allows you to send email to your users whenever there is a new post on your blog.


It helps users check out new content and learn about your business / services. It also helps you build brand recognition among your users.


For detailed instructions, see our tutorial on how to add email subscription to your WordPress blog.


9. Buying an Email List


Buying an email list is undoubtedly the worst thing you can do to kill your whole email marketing. Those email lists are not real and even if some addresses are real, those people don’t know you and never signed up for receiving emails from you.


You will be sending unsolicited email and risking your brand name to be included into spam filters. You can be banned or penalized by your email service provider. Most importantly, you will be spending a lot more money to get very little response.


10. Ignoring Google Analytics to Boost Signups


Google Analytics


Google Analytics is the treasure trove of useful data that helps you make informed decisions. Many site owners aren’t aware of how they can use this information to build their email list.


If you haven’t yet installed it, then check out our guide on how to install Google Analytics in WordPress. After that follow our guide on how to use Google Analytics to understand how to analyze reports.


More experienced users can jump directly to this guide on how to use Google Analytics to discover ideas for lead magnets.


11. Sending Too Many Emails


We mentioned earlier that not sending enough emails can be a big mistake. Sending too many emails can be equally destructive.


Your users should know how many emails they should expect to receive when they signup. Many sites, including WPBeginner, allow users to choose from weekly, monthly, or daily emails.


If you are not segmenting your list like that, then you will need to find out the balance between a healthy email frequency and an annoying one.


We hope this article helped you learn about the most common mistakes WordPress users make while building their email list. You may also want to see our list of 10 WordPress plugins that will quickly help you get more traffic.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


The post 11 Email Marketing Mistakes WordPress Users Must Avoid appeared first on WPBeginner.







How to Easily Import and Export WordPress Users



Do you want to import and export WordPress users from one site to another? This could be really helpful when you are merging sites and want to automatically add all users from existing websites. In this article, we will show you how to easily import and export users in WordPress.


Import & Export WordPress Users


Why or When You May Need to Import & Export Users in WordPress?


While there are several use-cases for importing and exporting WordPress users, the three most common scenarios when you need to import / export users are:



  • When you purchase a website and want to merge the content and user base.

  • When you want to consolidate two sites and merge their content and user base.

  • When you want to import all users into an email list or your CRM.


On large multi-author sites or a membership site in WordPress, each user profile has tons of useful data (like profile photo, bio information, social links, and more).


While you can surely ask them to recreate their profile, it’s inconvenient and not an ideal user experience.


Having said that, let’s see how to easily import and export users from one WordPress site to another.


Video Tutorial



If you don’t like the video or need more instructions, then continue reading.


Export Users in WordPress


First thing you need to do is install and activate the Cimy User Manager plugin. For more details, see our step by step guide on how to install a WordPress plugin.


Upon activation, you need to visit Users » Cimy User Manager page and scroll down to the export section.


Exporting users


The plugin will show you the upload path and will ensure that it’s writable. This is where your export CSV file will be stored.


By default, the plugin will use commas to separate fields and quotes as text delimiter.


If you will be using this CSV file elsewhere and need to change these values, then you can do so here. Otherwise, you can leave them as they are.


Next, you need to select how you want to sort rows in your export file. By default, the plugin will add users by their registration date. You can change that to sort by login name, username, email, or post count.


If you will be using the CSV file with Microsoft Excel, then you can check the box next to Enable Excel compatibility mode option.


If you have used Cimy User Extra Fields plugin, then the last option allows you to include that data into the CSV file as well.


Once you are done with the options, you need to click on the Export button. The plugin will now export your WordPress user data and save it as a CSV file on your server.


You will see a success message with a download button along with the list of users exported to the CSV file. Simply click the download button to save the file in your computer.


You can now use this file to import users into another WordPress site.


Import Users in WordPress


This step will also require the same Cimy User Manager plugin that we used above to export users. Make sure that you have this plugin installed and activated on the site where you want to import users.


Next you need to visit Users » Cimy User Manager page to import users.


Import users from CSV file


First you need to click on the choose file button and select the CSV file you want to import. If your CSV file uses different delimiters than comma and double quotes, then you need to change them here.


You also need to check the box next to Create Users option. This will allow the plugin to create new users with the information in your CSV file.


Under the email notifications, you can check the options to send new users their account details and send password to existing users.


Finally, you can click on the Import button.


The plugin will now upload your CSV file from your computer and import users into your WordPress database.


You will see a success message with details on how many users imported, created, or modified during the process.


Users successfully imported into WordPress


The plugin will not only import users, it will also automatically assign them correct user role and fill in other profile settings.


New users created by the plugin will receive emails about setting up their passwords. If your users didn’t receive the emails, then you may want to check our guide on how to fix WordPress not sending email issue.


We hope this article helped you learn how to easily import/export users in WordPress. You may also want to see our list of 13 free user management plugins for WordPress.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


The post How to Easily Import and Export WordPress Users appeared first on WPBeginner.







How to Show User’s Last Login Date in WordPress



Recently, one of our readers asked us how to show a user’s last login date in WordPress. You may need this if you wanted to add an author activity box on your WordPress site. In this article, we will show you how to display user’s last login date in WordPress.


Showing a user's last login date in WordPress


Video Tutorial



If you don’t like the video or need more instructions, then continue reading.


Method 1: Showing a User’s Last Login Date in WordPress Admin Area


This method is easier, but it will only show a user’s last login date inside WordPress admin area.


First thing you need to do is install and activate the WP Last Login plugin. For more details, see our step by step guide on how to install a WordPress plugin.


Upon activation, you need to visit ‘Users’ page in the admin area. You will notice a new column showing each user’s last login date.


Last login date column in WordPress admin area


At first it may show ‘never’ for all users. That’s because a user needs to login since the plugin was activated so that it could capture last login date and store it.


Method 2: Manually Show User’s Last Login Date in WordPress


This method allows you to display a user’s last login date anywhere on your WordPress site.


Simply add this code to your theme’s functions.php file or a site-specific plugin.


If you’re new to adding code, then please read this guide on pasting code from the web.



<?php
/**
* Capture user login and add it as timestamp in user meta data
*
*/

function user_last_login( $user_login, $user ) {
update_user_meta( $user->ID, 'last_login', time() );
}
add_action( 'wp_login', 'user_last_login', 10, 2 );

/**
* Display last login time
*
*/

function wpb_lastlogin() {
$last_login = get_the_author_meta('last_login');
$the_login_date = human_time_diff($last_login);
return $the_login_date;
}

/**
* Add Shortcode lastlogin
*
*/

add_shortcode('lastlogin','wpb_lastlogin');
?>

This code adds last login as a meta key. Each time a user logs in, it saves the time as a meta key value. Before you want to test the plugin, you need to logout of WordPress and then login again.


You can then display this meta key value using [lastlogin] shortcode in your WordPress posts and widgets.


If you want to show last login information in your child theme, then you can add this code:



<?php echo 'Last seen: '. do_shortcode('[lastlogin]') .' ago'; ?>

Showing user's last login information in author bio box


As you would notice that this code displays relative date and time, i.e. ‘2 hours ago’ instead of full date and time. If you want to display the full date and time, then locate this line in the code above:


$the_login_date = human_time_diff($last_login);

Now replace it with this line:


$the_login_date = date('M j, Y h:i a', $last_login);

The ‘M j, Y h:i a’ part in this code is called date and time format string. If you want to change how this code displays date and time, then check out our guide on how to change date and time format in WordPress.


We hope this article helped you learn how to show user’s last login date in WordPress. You may also want to see our guide on how to add author info box in WordPress posts.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


The post How to Show User’s Last Login Date in WordPress appeared first on WPBeginner.







How to Bulk Delete WordPress Users with Specific Roles



Do you want to delete WordPress users with specific roles? While you can go to the users page and delete each user one by one, it’s not a feasible option if you have a lot of users. In this article, we will show you how to bulk delete WordPress users with specific roles.


Bulk Delete WordPress Users


Method 1: Manually Deleting WordPress Users with Specific Roles


This method is simpler and does not require you to install any plugin.


Simply go to the Users page on in your WordPress admin area. You will notice the list of users registered on your WordPress site.


Users page in WordPress


On top of the list, you will see the links to different user roles. When you click on a user role, it will show you the list of users with that specific user role.


This page only displays 20 users at a time. If you have more user accounts that you want to delete, then click on the Screen Options tab on the top right corner of the screen.


This will bring a fly-down menu where you can set the ‘Number of items per page’.


Show more items on the users page


For example, we want to delete users with subscriber user role, and there are 144 users with that role. We will enter 144 in the number of items per page field.


Click on the ‘Apply’ button, and the page will reload showing all user accounts with the subscriber user role.


Now you need to click on the select all checkbox next to the Username column to select all items displayed on the page.


Bulk select users you want to delete


If you don’t want to delete some users, then you can uncheck them now.


Once you are ready, click on the ‘Bulk Actions’ menu and then select ‘Delete’. After that click on the Apply button and WordPress will delete all selected user accounts.


If the user accounts you are trying to delete have created posts, then you will be asked what you want to do with those posts.


Delete or attribute content


You can select to delete all content created by those users or attribute it to an existing user account.


Click on the confirm deletion button to continue.


WordPress will now delete all selected users accounts from your site.


This method will work for a few hundred users, but if you have thousands of users, then you don’t want to adjust the screen options because it can potentially overload your server.


Instead you need to use Method #2.


Method 2: Bulk Delete WordPress Users with Specific Roles Using Plugin


The default way to bulk delete users with specific roles is quite simple. However, sometimes you may need to select users based on other criteria as well.


For example, you may want to delete users that haven’t logged in for a while, or users who signed up during a specific period of time.


In such a situation, the default user management tools will not be enough. Luckily, there are plugins that allow you to efficiently perform bulk tasks.


Let’s see how to delete users with specific roles using a plugin.


First thing you need to do is install and activate the Bulk Delete plugin. For more details, see our step by step guide on how to install a WordPress plugin.


Upon activation, you need to visit Bulk WP » Bulk Delete Users page.


Bulk delete users


Here you can select Bulk Delete options for deleting users. First, you can select the specific user roles. After that you can select the filtering options.


You can restrict bulk delete to users…



  • Who have registered in a given number of days.

  • Users who haven’t logged in the last __ of days.

  • Only if user doesn’t have any post.

  • Only delete first __ users.


You can also select users by meta data.


Scroll down a little to the ‘By User Meta’ box. In this box, you can select meta fields and use conditional operators to compare their values.


Bulk delete users by user meta data


Click on the Bulk Delete button and the users matching the specific criteria will be deleted.


That’s all we hope this article helped you learn how to bulk delete WordPress users with specific roles. You may also want to see our list of 13 free user management plugins for WordPress.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


The post How to Bulk Delete WordPress Users with Specific Roles appeared first on WPBeginner.







10 Best Facebook Tips and Tutorials for WordPress Users



Looking for some Facebook tips and tutorials for your WordPress site? With more than a billion active users, Facebook is the largest social media website in the world. No website owner can afford to ignore the potential of Facebook for the success of their business. In this article, we will show you some of the best Facebook tips and tutorials for WordPress users to help you maximize your reach.


Best Facebook tips and tutorials for WordPress users


1. Add Facebook Page Plugin in WordPress


Facebook Pages allow you to engage with your audience on Facebook. You can use your Facebook page to promote your WordPress site. However, you will also need to let your users know that they can find you on Facebook.


Facebook Page plugin


Facebook Page plugin allows you to add a Like box to your website. Your users can then like your Facebook page without leaving your website. For detailed instructions, see our step by step tutorial on how to add the Facebook page plugin in WordPress site.


2. Add Facebook Instant Articles for WordPress


Facebook Instant Articles is a Facebook feature which allows your content to load upto 10x faster on mobile devices. It uses the same technology used in Facebook mobile apps.


Facebook Instant Articles


Faster speed tremendously improves the user experience on mobile devices. Users will see a lightening bolt icon on articles available in Instant Articles format. This encourages more users to click on your content in their Facebook news feed.


Here is our complete step by step tutorial on how to setup Facebook Instant Articles for WordPress


3. Add Facebook Remarketing/Retargeting Pixel in WordPress


Facebook retargeting pixel


Ever wondered how you start seeing Facebook ads for websites you visit outside Facebook? This is called retargeting also known as remarketing.


Those websites use Facebook retargeting pixel. This pixel does not add anything visible to your site. It only sends a browser cookie to your users which allows Facebook to track them on Facebook.


People who are already interested in your website are more likely to click on your ads on Facebook. It also helps you develop brand recognition among your users.


For complete instructions, see our guide on how to install Facebook Remarketing/Retargeting pixel in WordPress.


4. Add Facebook Open Graph Meta Data


Facebook automatically displays your article’s title, description, and an image when someone shares it on Facebook. However, sometimes Facebook is unable to show the right image or correct description.


Facebook Open Graph metadata allows you to tell Facebook which image and description you want them to show.


The easiest way to add Facebook open graph meta data is by using the Yoast SEO plugin. Simply install and activate the plugin. For more details, see our step by step guide on how to install a WordPress plugin.


Upon activation, you need to visit SEO » Social page and click on the Facebook tab.


Yoast SEO Facebook open graph meta data


After that, you need to click Enabled under ‘Add Open Graph Meta Data’ option. Don’t forget to click on the save changes button to store your settings.


Yoast SEO will now automatically add Facebook open graph meta data for all posts and pages on your WordPress site.


For more detailed instructions, see our guide on how to add Facebook open graph meta data in WordPress.


5. Add Facebook Comments in WordPress


Facebook Comments for WordPress


If you get a lot of comments on your articles, then they can slow down your website. By using Facebook comments, you can ease that load from your website and make it faster.


Another benefit of using Facebook comments is that it helps you get more likes and traffic from Facebook to your articles. Users commenting on your posts can instantly share their comment with their friends.


For complete installation and setup instructions, visit our guide on how to install and setup Facebook comments in WordPress.


6. Add Login with Facebook in WordPress


Login with Facebook button in WordPress


Social login buttons allow your users to log in to your website using their existing social media accounts. This helps them login quickly and saves them from remembering another password.


To add Facebook login on your site, the first thing you will need to do is install and activate the Nextend Facebook Connect plugin. Upon activation, go to Settings » Nextend FB Connect to configure the plugin.


Facebook Connect settings


The plugin requires you to provide a Facebook app ID and secret keys. You can create an app by visiting Facebook Developers website.


For step by step instructions, follow our tutorial on how to add login with Facebook in WordPress.


7. Get Facebook Insights for Your WordPress Site


Facebook Insights allows you to see how your content is doing on Facebook. It shows which of your posts or pages are most liked and shared. If you are using Facebook comments, then you can also see which posts get more comments.


The easiest way to get Facebook Insights is by using the Yoast SEO plugin. After installing and activating the plugin, head over to SEO » Social page and click on Facebook tab.


You need to scroll down to ‘Facebook Insights and Admins’ section. Here you can click on ‘Add Facebook Admin’ button and provide admin’s name and Facebook user ID.


Yoast SEO Facebook Insights


If you have already created a Facebook app for your page, then you can provide an App ID instead of a user’s ID.


Don’t forget to click on the save changes button to store your settings.


That’s all you can now visit Facebook Insights page and you will see your website listed there. Click on your website to see your Insight reports.


For more on this topic, you may want to look at our detailed guide on how to get Facebook Insights for your WordPress site.


8. Add Facebook Author Tag in WordPress Posts


Facebook author tag allows you to display author name with your articles when they are shared on Facebook. The author name is linked to author’s Facebook profile, allowing you to get more users engaged with authors on your site.


fbauthortag1


Once again, you will need the Yoast SEO plugin. First you will need to enable Open Graph meta data (see above).


Enter your Facebook profile URL


After that, you need to go to your profile Users » Profile page. Scroll down to Facebook Profile URL option and enter your Facebook profile URL.


Don’t forget to click on the Save Changes button to store your settings.


That’s all, you will now start seeing an author name when your posts are shared on Facebook.


9. Create Custom Facebook Feeds in WordPress


Displaying your Facebook posts on your WordPress site can help you boost engagement and convince more users to like your Facebook page.


The Custom Facebook Feed plugin helps you display your Facebook status while making it match your website design.


We have created a detailed step by step guide on how to create custom Facebook feed in WordPress.


10. Embed Facebook Video in WordPress


Adding Facebook Videos in WordPress


Facebook videos are hot. If you’re sharing a lot of unique video content with your Facebook audience, and want to embed them on your WordPress site, then it is definitely possible.


This process is not as streamlined as one would hope, but our hope is that Facebook will make it easier in the future.


We have created a detailed step by step guide on how to embed a Facebook video in WordPress.


We hope this article helped you find the best Facebook tips and tutorials for WordPress. You may also want to see our list of 19+ free Google tools every WordPress blogger should use.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


The post 10 Best Facebook Tips and Tutorials for WordPress Users appeared first on WPBeginner.