Help Center
How to Create Page Templates for Different User Roles

How to Create Page Templates for Different User Roles

Find out how to build page templates for various WordPress user roles with the JetThemeCore plugin and premade templates built in Gutenberg or Elementor.

Before you start, check the tutorial requirements:

  • Elementor, Block Editor, or the Bricks theme

  • JetThemeCore plugin installed and activated

  • Users created with assigned roles. If you have not done it yet, read the tutorial.

JetThemeCore is a tool that allows you to create various page templates for the WordPress website. From now on, you can also build them only for the required user roles. First, proceed to WordPress Dashboard > Crocoblock > Theme Builder. Here, two layouts are available: the “Tree view” (default) and the “Grid view.”

Create Page Templates in the Tree View Layout

To create a needed template, press the “plus” button near the template of the required type.

tree view of the theme builder tab
Things to know

To change the icon size, switch to the "Large," "Medium," and "Small" View size options.

Here, we press the “plus” button near the All Archives template. Next, the Create page template pop-up appears.

In this pop-up, define whether you want to include or exclude items by selecting the same-named options in the first drop-down menu. Initially, we pick the “Include” option. However, you are free to choose the “Exclude” option if required. 

In the second list, we choose the “Advanced” option, which refers to additional conditions, including those for WordPress users. Afterward, we pick “Roles” in the following selector. In the final drop-down menu, you can select one or more WordPress roles from the proposed ones. For instance, we include the “Administrator” role. If needed, we press the “Add Condition” button to adjust one more condition.

assigning conditions for page templates

Once completed, click the “Save” button in the pop-up.

Create Page Templates in the Grid View Layout

To create page templates in the “Grid View” layout, switch it by clicking the “Grid view” button. Here, you can set conditions anytime you need by pressing the dots-shaped button next to the desired page template. Then, push one more, the “Edit conditions” button.

grid view of the theme builder tab

Once pressed, the Set the page template visibility conditions pop-up appears. Here, in this pop-up, you can set the same options as for the Create page template pop-up. In particular, we pick the “Include” option. However, you are free to choose the “Exclude” option if required. Then, in the second list, we choose the “Advanced” option, which refers to additional conditions, including those for WordPress users. 

Afterward, pick “Roles” in the following selector. You can select one or more WordPress roles from the offered ones in the final drop-down menu.

set the page template visibility conditions

Next, we set the template’s location – this time, the front page. Once the “Add Condition” button is pressed, we select the “Include,” “Singular,” and “Home Page” options. We also include the “Administrator,” “Editor,” and “Subscriber” roles. Once set, the assigned user roles will be displayed under the corresponding page data.

page templates with assigned user roles

Test the Flow

Now, we can check the result by heading to the home page. Note that we are now logged in as a user with the required WordPress rights to see the template, namely the “Administrator,” “Author,” or “Subscriber” roles. In this case, the home page can be designed by the user with the “Administrator” role or another user with the assigned “Subscriber” role and/or “Editor” roles.

Things to know

Users, their names, and assigned roles are enlisted in the WordPress Dashboard > Users tab.

For example, if the “Mary Scott” user with the “Subscriber” role logs in, this user will be able to edit the home page.

subscriber user that is allowed to design the page

In contrast, users with other roles assigned will not be able to edit this page, as we included only the “Administrator,” “Author,” or “Subscriber” roles.

Like that, you can now include or exclude any desired WordPress roles for the needed JetThemeCore page template on your WordPress website.

Was this article helpful?
YesNo

Need help?

Ask Facebook community

Get answers from 30K+ Crocoblock Community experts from all over the world.

Start a live chat

Ask question to support agent and share its details via chat messages.