Categories
Website

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

Categories
Website

How to Allow Users to Submit Posts to Your WordPress Site

Have you ever seen websites that allow users to submit posts or other type of content? Do you want to have user-submitted content on your site? In this article, we will show you how to allow users to submit blog posts to your WordPress site.

User Submitted Posts in WordPress

You will be able to moderate all user-submitted content like comments and approve them only if you like it. Your users will be able to submit blog posts from the front-end without ever logging into your admin area.

If you want to require only registered users to submit blog posts, then we will show you that as well.

Frontend publishing is very useful when you want users to submit guest blog posts, add images to your gallery, or create new business listings in your business directory.

Having said that, let’s look at the three ways to allow users to submit posts on your WordPress site without writing any code.

Method 1: Front-end WordPress Post Submissions with WPForms

This method allows your users to submit posts from the front-end of your website without visiting the admin area of your WordPress site. You can even accept blog posts from users without asking them to register.

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

WPForms is a premium WordPress forms plugin. You will need the pro version of the plugin to access the post submissions addon.

Upon activation, you need to visit WPForms » Settings page to enter your license key. You can get this key from your account on the WPForms website.

WPForms license key

After verification, you need to visit WPForms » Addons page. Scroll down to ‘Post submissions addon’ and click on the ‘Install Addon’ button.

Post submission addon

WPForms will now install the post submissions addon for you. You will need to click on the Activate button to start using the addon.

You are now ready to create a post submission form.

Head over to WPForms » Add New page which will launch WPForm’s form builder interface.

First you need to provide a name for your form. Under ‘Select a Template’ section, you need to click on ‘Blog post submission form’ template.

Selecting post submission form template

WPForms will now load the form template with all the fields that you will need for a typical blog post submission form.

You can edit form fields by clicking on them. You can also add new fields from the panel on your left.

Editing the post submission form

WPForms let your users select post categories, add featured images, post excerpts, and even add custom fields.

Once you are satisfied with the form, you need to click on the ‘Settings’ tab and then click on ‘Post Submissions’ tab.

Mapping form fields

On this page, you can map each fields to the respective post fields in WordPress. WPForms does an excellent job at matching the fields in the form template.

By default, user submitted posts will be saved as ‘Drafts’ pending review. You can also change the post type and allow users to submit content to your custom post types.

Don’t forget to click on the Save button at the top right corner of the screen to save your form. Click on the close button to exit the form builder.

Now you are ready to add the form to your website.

You can create a new page or edit an existing one. On the post edit screen, you will notice the ‘Add Form’ button.

Add post submission form to a WordPress page

This will bring up a popup where you need to select the post submission form you just created.

Insert form

Click on the Add form button, and you will notice the WPForms shortcode appear in the post editor.

You can now save or publish this page and then visit your website to see your post submission form in action.

Preview user submitted forms

Method 2: Accept User-Generated Content with User Submitted Posts Plugin

Another way to accept user submitted content on your website is by using the User Submitted Posts plugin.

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

Upon activation, you need to visit Settings » User Submitted Posts to configure the plugin.

User submitted posts settings

Under plugin settings, you can select the fields you want to display on the post submission form and hide any field that you don’t want users to see.

You can choose a default author for all user submitted content. We would recommend that you create a new Guest User on your WordPress site and assign all user submitted posts to that user.

You can also allow users to upload images and set a limit on number of images and maximum image size. You can even set a user uploaded image as the featured image.

After reviewing all plugin settings, click on the Save Changes button to store your settings.

You are now ready to add the user submitted posts form to your website.

Create a new page in WordPress or edit an existing page where you would like to show the form. In the post editor simply add this shortcode

[user-submitted-posts]

You can now save or publish your page. Visit the page to see your user submitted posts form in action.

User submitted posts form

Method 3: Allowing Users to Register and Submit Posts in WordPress

WordPress comes with built in user roles and capabilities which allow you to run a multi-author WordPress site.

You can allow users to register on your site and create content using WordPress admin interface with limited capabilities.

First you need to enable user registration on your site. Go to Settings » General page and check ‘Any one can register’ next to Membership option. Choose ‘Author’ or ‘Contributor’ as the default user role.

Allow user registration on your WordPress site

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

Users can now register on your WordPress site by visiting the WordPress login and registration pages. You can even create custom user registration form in WordPress.

Once registered, users can login to your WordPress site and submit posts.

Problems with this method:

Many beginners find this method a bit difficult for different reasons.

For example, if you are using two step authentication on your WordPress site, then your users may find it difficult to login.

Many websites password protect WordPress admin directory. Allowing users to register and use WordPress admin area means you will have to share that password with them.

Registered users with author roles can see what other posts you have on your website.

If these issues bother you, then you can use method #1 or #2 to allow users to submit WordPress posts without logging into admin area.

That’s all. We hope this article helped you learn how to allow users to submit posts to your WordPress site. You may also want to see our list of 19 actionable tips to drive traffic to 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.



Source link

Categories
Website

How to Create Custom WordPress Layouts With Elementor

Want to create your own custom page layouts in WordPress? Elementor is a drag & drop WordPress page builder that allows you to easily create custom WordPress layouts without having any coding knowledge. In this article, we will show you how to easily create custom WordPress layouts with Elementor with just a few clicks.

How to Create Custom WordPress Layouts with Elementor

Why and When Do You Need Custom WordPress Layouts?

Many free and premium WordPress themes come with multiple layout choices for different kind of pages. However, sometimes none of these layouts would meet your requirements.

If you know how to code in PHP, HTML, and CSS, then you can create your own page templates or even build a child theme for your site. However, majority of WordPress users are not developers, so this option doesn’t work for them.

Wouldn’t it be great if you could just create page layouts using a drag and drop interface?

This is exactly what Elementor does. It is a drag and drop WordPress page builder plugin that allows you to easily create your own custom WordPress layouts without any coding skills.

It has an intuitive user interface that lets you build custom layouts with a live preview. It comes with many ready to use modules for all kind of web design elements.

There are several professionally designed templates that you can instantly load and use as a starting point. It works with all standard compliant WordPress themes and is compatible with all popular WordPress plugins.

Having said that, let’s take a look at how to create custom WordPress layouts with Elementor.

Getting Started with Elementor

First you will need to purchase Elementor Pro plugin. It is the paid version of the free Elementor plugin and gives you access to additional features and 1 year of support.

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

Upon activation, you need to visit Elementor » Settings page to configure plugin settings.

Elementor settings

Here you can enable Elementor for different post types. By default, it is enabled for your WordPress posts and pages. If you have custom post types on your site, then those will also appear here, and you can enable them as well.

You can exclude or include user roles that can use Elementor when writing posts or pages. By default, it is enabled only for administrators.

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

Creating Custom WordPress Layout with Elementor

First you need to create a new page (or post) on your WordPress site. On the post edit screen, you will notice the new ‘Edit with Elementor’ button.

Edit with Elementor button

Clicking on it will launch the Elementor user interface where you can edit your page using Elementor’s drag and drop page builder.

Elementor builder interface

Now you can add sections and build your page from scratch, or you can add a template.

Templates are a faster way to quickly get you started. Elementor comes with several professionally designed templates that you can customize as much as you want.

Let’s start with a template by clicking on the ‘Add Template’ button.

This will bring up a popup where you will be able to see different templates available. You should look for a template that is similar to what you have in mind for your page layout.

Select and insert a template

Now click to select the template you like and then click on the ‘Insert’ button to add it to your page.

Elementor will now load the template for you.

You can now start editing the template to match your needs. Simply point and click on any element to select it, and Elementor will show you its settings in the left column.

Editing an item in Elementor

Now let’s talk about how Elementor layouts work.

Elementor layouts are built using sections, columns, and widgets. Sections are like rows or blocks that you place on your page.

Each section can have multiple columns and each section and column can have its own styles, colors, content, etc.

Editing sections and columns in Elementor

You can add anything in your columns and sections using Elementor widgets.

These widgets are different kind of content blocks that you can place in your Elementor sections.

Simply select a widget and drop it into your section or column. There is an extensive set of widgets available that cover all popular web design elements that you can think of.

Elementor Widgets

You can add images, text, headings, image galleries, videos, maps, icons, testimonials, slider, carousels, and so much more.

You can also add default WordPress widgets and even the widgets created by other WordPress plugins on your site.

Once you are done editing, you can click on the Save button to save your changes.

Save and exit Elementor

Note: Saving a layout will not publish the page on your WordPress site. It will just save your page layout.

You can now preview your page or go to WordPress dashboard.

This will bring you back to the WordPress post editor. You can now save your WordPress page or publish it on your website.

Publish page

Creating Your Own Templates in Elementor

Elementor allows you to save your own custom layouts as templates. This way you can reuse your own templates to create new pages even faster in the future.

Simply edit the page you would like to save as a template with Elementor.

In the Elementor builder interface, click on the folder icon next to the save button and then select ‘Save template’.

Save your template

This will bring up a popup where you need to provide a name for your template and click on the save button.

Template name

Next time you are creating a custom page layout, you would be able to select it from the ‘My Templates’ tab.

Custom template

You can also export this template and use it on other WordPress sites using Elementor.

You will need to visit Elementor » Library page to see your saved templates. Take your mouse over to your template name and then click on ‘Export template’ link.

Export template

After downloading your template file you can go to the library page on another WordPress site using Elementor and then import your template.

That’s all for now.

We hope this article helped you learn how to create custom WordPress layouts with Elementor. You may also want to see our step by step guide on how to speed up WordPress and boost performance.

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

Categories
Website

How to Allow Users to Delete their WordPress Accounts

Do you want to allow users to delete their own WordPress accounts? If you allow user registration on your WordPress site, and a user does not want to keep their account anymore, then they will have to manually ask you to delete their account. In this article, we will show you how to allow users to delete their WordPress account from their account area.

Allow users to delete their accounts in WordPress

Why Allow Users to Unregister Themselves in WordPress?

Many WordPress websites allow users to register and login. This could be membership websites, blogs that accept user submitted posts, or an online store.

Once users register their WordPress account, they cannot delete it on their own. They will have to manually ask you through a contact form to delete their information.

Website owners may want to keep the user contributed content or at least have their email address. However, if you give users control of their information, then they may feel more confident in their interactions on your website.

That being said, let’s see how to easily allow users to unregister themselves in WordPress and delete their WordPress account information completely.

Allowing Users to Delete their WordPress Accounts

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

Upon activation, you need to visit the Settings » Delete Me page in your WordPress admin area to configure plugin settings.

Delete Me settings

First you want to select the user roles that can delete their own profiles. You can also choose link styling and text that they will see on their profile page.

By default once the account is deleted, the plugin will redirect users to your site’s homepage. However, you can change that and provide a custom URL for redirect such as a thank you page. Additionally, you can choose to delete user comments as well.

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

Now you will need to switch to a user account under the user roles you selected earlier. Once logged in, go ahead and visit the Profile page, and you will see a new section where users can click to delete their account.

Delete account link on user profile page

When a user clicks on the link, they will be shown a warning that deleting an account will delete their access and all their content. Once the user agrees, this plugin will proceed and delete their account.

Adding Delete Account Link to Custom User Profile Page

If you use a custom user profile page, then this is how you can allow users to delete their WordPress account.

Simply add the following shortcode to your custom profile page template:

[plugin_delete_me]Delete Your Account[/plugin_delete_me]

Note: When a user deletes their account, it will also delete all their content (posts, pages, custom post types) and move it to trash.

A user can re-register a new account using the same email address, but this will not recover the content they contributed earlier. However, as a site administrator, you can recover content from trash if it is not permanently deleted.

We hope this article helped you learn how to allow users to unregister in WordPress. You may also want to see our step by step WordPress security guide for beginners.

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