Tag - Users

How to Restrict Your WordPress Forms to Logged-in Users Only


Are you looking for an easy way to restrict your WordPress form submissions to logged-in users only?

If you have a membership site, online store, or another type of website that has registered users, then you may want to restrict certain forms access to only logged in users.

In this article, we will show you how to restrict your WordPress forms access so only logged in users can fill out and submit them.

Restrict Form Access in WordPress

When and Why You Need to Restrict Access for WordPress Forms?

There could be a number of scenarios when you would need to restrict access to certain WordPress forms to logged-in users only.

For example:

  • You may be hosting a private members event, and you only want registered users on your site to RSVP.
  • You may restrict access to support for members only, and by restricting it to logged-in users only, you can dynamically populate certain information from their profile.
  • You might want to run an employee survey or poll, and you want to restrict access to your internal team only.
  • You are running a customer NPS survey that you only want to be submitted by logged-in users only.
  • You might have a special prize claim form that you want to be accessed by only certain logged-in users.

These are just some examples, but there could be literally hundreds of other use cases where you want to restrict form access to registered users only.

With that said, let’s take a look how to restrict your WordPress form access to logged-in users only.

Method 1: Restrict Form Access with WPForms Form Locker Addon

This method is easiest and most powerful, so we recommend it for all beginner users. We will use the WPForms plugin and their Form Locker addon to completely lock down WordPress form access.

WPForms is the best WordPress form plugin used by over 2 million websites. It was created by WPBeginner’s founder, Syed Balkhi, to have all the features we needed for running our business.

The first thing you need to do is install and activate the WPForms plugin. For more details, see this step by step guide on how to install a plugin in WordPress.

Upon activation, you need to enter your license key and then add over to the WPForms » Addons page to install the Form Locker Addon.

WPForms Form Locker Addon

Now you’re ready to create a new form that has restricted access for logged-in users.

To do this, go ahead and create a new form by going to WPForms » Add New. This will open the WPForms form builder where you will be presented with the option to either choose a form template or start with a blank one.

WPForms drag & drop form builder is extremely easy to use, so you can add or remove fields and customize the form to your liking.

WPForms Form Builder

Once you have added all the necessary fields, you need to go to the Settings Tab and click on Form Locker.

WPForms Form Locker Settings

On this tab, you will see the option to enable password protection for your WordPress forms, set total entry limits, enable form scheduling, and enable restricting entries to logged-in users only.

Form Locker Logged in User Only

Once you check the box, you will see a new Message field where you will need to draft a message that will appear to all users who are not logged in to your site.

WPForms Form Locker Restrict Access Message

Once done, you can tweak other form settings that you might need and then click the Save button.

Now you can embed this form on any WordPress post or page on your site by using the WPForms shortcode in the Classic Editor or by using the WPForms block in the Gutenberg editor.

Simply go to Post or Pages, and then click on the Plus icon to select a block. Next, type WPForms in the block search.

Add WPForms block to WordPress post or page

Once the WPForms block is added, select your form to embed and you’re done. Congratulations, you have successfully created a WordPress form that’s restricted to logged-in users only.

Method 2: Restrict Form Access with Password Protected or Private Pages

Another way to restrict form access in WordPress is by using the default WordPress visibility settings. You can use this method with the free version of WPForms or any other contact form plugin.

Simply create a Page or Post where you want to embed the form. After that click on the Visibility settings on the right panel.

WordPress Page Visibility Settings

You have the option to either make the whole page private or make the whole page password protected.

Private pages can only be seen by the Administrators and Editor level users on your website.

If you set a password for the page, then you will have to share that password with everyone who you want to give access to.

While this method works, there are several downsides to it.

First, the entire page is hidden not just the forms area. You lack the finer controls, and there’s no way for you to see which logged-in user submitted the form (if you’re using the password protected setting).

Method 3: Use Advanced Membership Plugins to Restrict Form Access

If you’re using an advanced WordPress membership plugin like MemberPress, then it comes with a lot of access control features built-in.

You can simply go to MemberPress » Rules to create a new permissions rule.

Add new rules in MemberPress

The rule edit page allows you to select different conditions and associate them to a membership plan.

For example, you can select all content that matches a particular tag or category to be available only to members with the silver subscription plan.

Add a rules set to MemberPress

You can also create more specific rules. For example, a single post or page, child pages, or a specific URL.

Once you have set the rules, you can use it in combination with any WordPress contact form plugin to restrict form access to logged-in users only.

For more details, see our step by step guide on how to restrict content access in WordPress.

We hope this article helped you learn how to restrict your WordPress forms to logged-in users only. You may also want to see our list of best WordPress plugins for business websites.

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.



Source link

How to Detect AdBlock Users in WordPress (3 Easy Ways)


Do you want to detect AdBlock users in WordPress and show them targeted messages?

Adblock Plus is a popular software which blocks advertisements on the internet. It is available as an add-on for all top browsers, mobile apps, and even as a dedicated browser.

Now the problem is that most bloggers rely on the ad revenue to support their website. Software like AdBlock plus hurt their revenue potential and ultimately their plans to grow their business.

In this article, we will show you how to detect Adblock users in WordPress and share ways to bypass the Adblock software.

Detect and bypass AdBlock users in WordPress

What is AdBlock and How it Hurts Website Owners?

Adblock Plus and other adblocking software allow users to automatically detect and block advertisement on websites.

While Adblock brings a cherished ad-free experience to users, it can hurt bloggers and website owners who rely solely on ad revenues.

Research published by Global Web Index shows that adblocker usage has increased over the past few years.

Nearly 47% of internet users have some kind of adblocking software installed on their devices.

Adblock usage study

Adblocking on mobile devices has increased many folds and is now higher than desktop computers.

Another research conducted by Ovum estimates that publishers will lose $32 Billion to Adblock software by the year 2020.

This is a serious problem affecting many websites particularly blogs that rely on advertisements as their primary source of revenue.

What should you do about Adblock as a publisher?

There are several measures that website owners have taken in this regard.

1. The Do-Nothing Approach

As the title says, you do nothing about the users with Adblock. You simply learn to live with the loss of revenue for the sake of happy users.

2. Passive Approach

You can nicely ask your users to whitelist your website with a promise of quality content and non-obtrusive ads. There is no way to know how effective such an appeal would be.

Another alternative is to create a membership website with paid subscription plans. You can promote paid plans as an ad-free experience with additional content and features.

Reddit is a great example of this approach with its ad-free Reddit Premium plan.

Reddit premium

3. Aggressive Approach

In this approach, you simply block access to your website for all users with AdBlock enabled. If they want to view your content, then they must disable AdBlock.

AdBlock wall on Forbes

This kind of anti Adblock approach is rather aggressive, and it will turn away users from your site. Studies show that 77% of Adblock users leave websites with Adblock walls.

It’s best to use the passive approach that we mentioned above.

How to Detect AdBlock Users in WordPress

Before you can request users to whitelist and support your website, you need to be able to detect the AdBlock users. Fortunately, there are plenty of ways to do that in WordPress.

We will show you a few different methods, and you can choose the one that best suits you.

1. Detect and Target AdBlock Users with OptinMonster

OptinMonster is the best lead generation software in the market. It helps you convert website visitors into subscribers and customers.

OptinMonster comes with a built-in ad blocking detector which allows you to show targeted campaigns to users with ad-blocking software installed on their devices. This includes popular software like AdBlock, AdBlock Plus, and uBlock Origin.

First you will need to sign up for an OptinMonster account. You’ll need at least their Growth plan to access the AdBlock targeting.

Once you have signed up, you can head over to your WordPress site to install and activate the OptinMonster plugin. For more details, see our step by step guide on how to install a WordPress plugin.

This plugin acts as a connector between your website and OptinMonster.

Upon activation, you need to click on the OptinMonster icon in your WordPress admin bar. You’ll be asked to connect your OptinMonster account authorizing your website or entering an API key.

OptinMonster API key

After authorizing OptinMonster, click on the ‘Create new campaign’ button at the top.

Create new campaign

This will take you to the OptinMonster website.

First, you will need to choose a campaign type. If you want to take the passive approach, then you can use the lightbox popup campaign type. On the other hand, if you want to aggressively lockout AdBlock users, then you can use the Fullscreen campaign type.

Choose a campaign type

Next, you need to choose a template for your campaign. For this tutorial, we are using the ‘Target’ theme, but you can choose a different template if you want.

Choose template

Now you will be asked to choose a title for your campaign. After that, you will be redirected to the OptinMonster’s campaign designer.

From here, you need to change your optin view to the ‘Yes/No’ view by clicking on the buton at the top and then turning on ‘Display Yes/No view’.

Enable Yes / No view

After that, you need to simply point on any element in the optin preview to edit it. You can click on the text to add your own copy.

Change campaign text

Next, you need to click on the yes and no buttons to edit their text. We have changed the yes button to ‘I have disabled AdBlock’ and the no button to ‘I will think about it’.

After that, you need to click on the ‘Display Rules’ tab. Under the first rule, you need to select ‘user has adblock enabled’.

Enable adblock detection rule

After that, make sure that the current URL path is set to every page. This will display the popup on all pages of your website.

Display popup on everypage

Click on the ‘Next step’ button to continue.

Now you’ll be asked to select the default view. Make sure that it is set to Yes/No view and then click on the ‘Next Step’ button.

Select view for your campaign

Your Adblock campaign is almost ready. Let’s publish it to make it available on your website.

Switch to the ‘Publish’ tab in the builder and change the status option to live.

Publish your Adblock tracking campaign

You can now save your campaign to store your changes.

Next, switch back to your WordPress admin area and click on the OptinMonster menu from the admin sidebar. You’ll see your new Adblocker tracking popup under ‘Campaigns’ tab. If you don’t see it, then click on the ‘Refresh campaigns’ button.

OptinMonster campaigns

Make sure that the campaign status is set to live.

That’s all, your Adblocker campaign is now live on your WordPress website.

You can test out your campaign by installing the AdBlock extension in your browser and visiting your website. You will see a popup asking users to support your website by disabling AdBlock.

AdBlock detector popup

For an aggressive approach, you may want to see this guide on how to lock out AdBlock users with OptinMonster’s AdBlock targeting feature. This will allow you to block adblock users from viewing your content until they disable adblock software.

AdBlock lockout

2. Target AdBlock Users with AdSanity Plugin

AdSanity is one of the best ad management plugins for WordPress. It has a paid ‘Adblock Detection’ add-on that allows you to detect users with ad blocking software and restrict their access to your website until they disable ad blocking.

First, you need to install and activate the AdSanity plugin. After that you need to install and activate their Ad Block Detection add-on. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation of both plugins, you need to visit AdSanity » Settings page and click on the Add-Ons tab.

AdSanity Ad Block detection settings

AdSanity allows you to detect AdBlock on posts and pages. You can show a warning popup to AdBlock users with your custom message, or you can redirect them to a custom page.

Both methods are aggressive and would require users to disable AdBlock to continue browsing your site.

3. Detect AdBlock Users with deAdblocker

If you are looking for a free option that allows you to detect AdBlock users, then you can try this method.

First, you will need to install and activate the deAdblocker plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Note: this plugin shows an outdated notice in WordPress, but we tested it, and it works just fine with the latest version.

Upon activation, head over to Settings » deAdblocker page to configure plugin settings.

deAdblocker settings

The plugin allows two methods to show a custom message to AdBlock users. You can either display a notification bar on the top of your website or show a lightbox popup.

Both options are dismissible, and users will be able to ignore the message to continue browsing your website.

Don’t forget to save your settings. You can now visit your website with AdBlock extension installed in your browser to test the plugin.

AdBlock popup

Tips on Mitigating Adblock Losses

Internet users are finding more ways to block ads across the internet. Fighting ad blocking software can be tiresome and an unending struggle to recover lost revenue.

One thing to consider is changing the way you make money on your website. Finding new ways to monetize your content will give you the freedom to rely less on ads and build a sustainable business in the long run.

Diversify Your Revenue Streams

Publishers are finding new ways to combat ad blocking and protect their earnings. At the same time, ad blocking software are getting better every day.

Research shows that privacy, security, and bad user experience are the most common complaints among AdBlock users. Publishers can address these complaints by adapting different monetization methods that address those issues.

1. Affiliate marketing

Affiliate marketing is one of the most common ways to earn money from your content. You can recommend products and services to your users and earn commission when users make a purchase using your affiliate link.

There are plenty of plugins and tools for affiliate marketers that will help you get started.

For more details, see our beginner’s guide to affiliate marketing.

2. Selling direct ads

Advertise page on Buzzfeed

If you are serving ads through a third-party advertising network like Google AdSense, then you have limited control on ads, privacy, and the CPC.

Selling ads directly to advertisers allows you to ensure privacy, limit tracking, and control what you get paid.

WordPress ad management plugins like AdSanity allow you to serve your own ads as well. You can use hosted images on your own websites for ads and easily bypass most adblocking software.

Tip: Don’t wrap your ads around HTML elements with CSS classes like ads, advertisement, promo, etc. This is how AdBlocking software detect and block ads.

3. Sponsored Content

Allow advertisers to sponsor content on your website. You can write content about their product or service, and you can even include an affiliate link to get referral commission. You can also accept user-submitted posts directly on your website.

4. Premium Content

Another helpful strategy used by many online publications is premium content. You can adapt a pay per view model, membership plans, sell online courses, or simply restrict pages to paid users.

Paywall on the Washington Post website

For more ways to diversify your website’s revenue, take a look at our guide on different ways to make money online from your website and easy to start new online business ideas.

We hope this article helped you learn how to detect and bypass AdBlock in WordPress. You may also want to see our guide on how to create an email newsletter or 10 marketing data that you must track on every website.

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.



Source link

How to Allow Users to Edit their Comments in WordPress


Have you ever felt the need to edit a comment you just left on a website?

Maybe you want to correct a spelling or grammar or error, or maybe you accidentally hit the submit button before finishing your comment.

It happens to all of us. The problem is that most WordPress sites do not allow users to edit their comments once they are published.

If you receive a lot of comments on your website, then you may want to consider allowing users to edit their own comments for a short period of time.

In this article, we’ll show you how to allow users to easily edit their comments in WordPress for a short period of time.

How to Allow Users to Edit their Ccomment in WordPress

Why Allow Users to Edit or Delete their Comments

Most WordPress sites allow users to submit comments on their articles after providing their name and email address. However, users are not allowed to edit or delete their comment.

Sometimes, people want to make changes to their comment after clicking on the submit button.

The most common scenario is to fix their mistakes like a spelling or a grammatical error. Some users may want to modify their comments to add or remove something.

There can also be some rare cases where a user may think about deleting their comment because what they wrote was is completely out of context.

Whatever the case may be, the best solution can be to allow people to edit their comments for a short period of time, maybe for the first 5 or 10 minutes.

During that time, they’ll be allowed to modify or even delete their comments.

The reason for adding the time limit is to make sure that link builders and spammers don’t abuse the comment section by adding links to their approved comments.

That being said, let’s take a look at how to easily allow users to edit their comments in WordPress.

Allowing Users to Edit Comments in WordPress

First thing you need to do is install and activate the Simple Comment Editing plugin. You can see our step by step guide on how to install a WordPress plugin for detailed instructions.

Upon activation, the plugin will allow your users to make changes to their comments within the first 5 minutes.

After the first 5 minutes, users will not able to edit their comments.

You can change this time limit by going to Settings » Simple Comment Editing in your WordPress admin area.

Simple Comment Editing plugin settings

On the settings page, you can change the time in the text field to anything you like.

However, it is recommended to set the limit under 30 minutes since the purpose is to allow users to fix the errors right away.

Once you’ve changed the time, you need to click on the Save Options button to store the changes.

Next, we recommend leaving a test comment on any of your posts, so you can see the plugin in action.

WordPress comment click to edit option

Once you’ve submitted your comment, you’ll find the “Click to Edit” link and a countdown timer below the comment text. The timer is useful for indicating the time within which you can edit your comment.

To modify your comment, you need to click on the Click to Edit link.

This will allow you to make changes to your comment. However, you’ll not be allowed to change your name, email, or website URL.

Edit comment with countdown timer

Once you’re done, you need to click on the Save button to update the comment.

If you want to delete your comment, then you have to click on the Delete button. This will open an alert box asking you to confirm that you want to delete your comment.

Allow users to delete their comments

Go ahead to click on OK to complete the process.

That’s all! We hope that this article helped you to learn how to allow users to edit their own comments in WordPress for a short period of time.

You may also want to see our guide on how to style the comment form of your WordPress site.

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 Edit their Comments in WordPress appeared first on WPBeginner.



Source link

How to Automatically Log out Idle Users in WordPress


Do you want to automatically log out idle users in WordPress? As a security-conscious site admin, you may want to force inactive users to login again.

Banking websites and apps already use this technique to avoid unauthorized users from accessing accounts or hijacking them. You can also implement this functionality on your own WordPress website to improve security.

In this article, we will show you how to automatically log out inactive users in WordPress. Once logged out, users will be asked to log in again to resume what they were doing.

How to automatically logout inactive or idle users in WordPress

The first thing you need to do is install and activate the Inactive Logout plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, simply go to Settings » Inactive Logout page to configure the plugin settings.

Settings page for Inactive Logout plugin

First, you need to enter the time after which a user will be automatically logged out. You can enter the time in minutes and make sure it is not too short or too long.

After that, you can enter a message that you want to be displayed to inactive users.

Below the message field, you will find more plugin options to change logout functionality. The default settings would work for most websites, but you can change them if you want.

Inactive users timeout settings

Popup Background – You can enable this option if you want to change the background color of screen when a user session times out. This option will cover the user’s browser screen and will keep the contents hidden from prying eyes.

Disable Timeout Countdown – This option will remove the countdown warning and will directly logout idle users.

Show Warn Message Only – If you don’t want to use auto logout feature, then check this option. It will only display the warning message and will cover the screen if you have popup background option checked.

Disable Concurrent Logins – This option will restrict your WordPress users from concurrent logins. This means they will not be able to use the same account to log in at the same time from different devices.

Enable Redirect – By default, the plugin displays a log in popup and does not redirect users. You can enable this option to redirect users to any other page you want.

After you have reviewed and changed settings, don’t forget to click on the ‘Save settings’ button to store your changes.

Setting up different timeout settings based on user roles

If you want to set timeout rules based on user roles and capabilities, then you can do so under the ‘Advanced Management’ tab on the plugin’s settings page.

First, you need to select the user roles that you want to set up differently than global settings. After that, you will be able to select timeout in minutes, redirects, or even disable timeout settings for that user role.

Multi-role idle user timeout settings

Once you are satisfied with the settings, click on the ‘Save settings’ button to save your changes.

To see the plugin in action, you can login to your website and do nothing for the time duration that you have set in plugin settings. After that, you will see a countdown timer popup appear.

Timeout countdown

You can click on the continue button to resume working without expiring the session.

Users who don’t click on the continue button will be logged out and they will see the login screen.

Login popup

Add More Security with Two Step Authentication

Now one problem with this approach is that many users save their passwords using a password manager or their browser’s built-in password storage feature.

This means that their login popup will already have their username and password fields filled in. Any person can just click on the login button to access their account while they are away.

Login fields already filled in

You can make unauthorized access more difficult by adding two-step verification to the WordPress login screen.

It basically requires users to enter a unique one-time password generated by an app on their phone. For detailed instructions, see our guide on how to add two-factor authentication in WordPress.

We hope this article helped you learn how to automatically log out idle users in WordPress. You may also want to see our ultimate WordPress security guide for more tips on securing your WordPress website.

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 Automatically Log out Idle Users in WordPress appeared first on WPBeginner.



Source link