Help Center
How to Create Page Templates for Different User Roles

How to Create Page Templates for Different User Roles

Learn about the JetThemeCore conditions and how to create page templates for different WordPress user roles.

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 demanded user roles.

First, proceed to WordPress Dashboard > Crocoblock > Theme Builder. Here, let’s build a page template. 

You can set the conditions before creating templates, as the needed pop-up appears right after the “Create new page template” button is clicked.

create new page template button

Or you can set conditions anytime you need by pressing the dots-shaped button next to the desired page template. Here you need to push one more, the “Edit conditions” button.

theme builder edit conditions button

Once clicked, define whether you want to include or exclude items by selecting the samely named options in the first drop-down menu. Initially, we picked the “Include” option. However, you are free to choose the “Exclude” option if required. 

Then in the second list, we choose the “Advanced” option as it refers to the additional conditions, including WordPress users. Afterward, pick “Roles” in the following selector.

You can select one or more WordPress roles from the proposed ones in the final drop-down menu.

theme builder select roles dropdown menu

For instance, we include the “Author” WordPress role.

Press the “Add Condition” button to adjust one more condition if needed.

included role

And just as importantly, we set the template’s location; this time, it is the front page. So, we select “Include,” “Singular,” and “Front Page” once the “Add Condition” button is pressed.

Push the “Save” button and close the window once conditions are set.

specified page condition

Now we can check the result by heading to the front page.

Pay attention that now we are logged in as a user with required WordPress rights to see the template, namely as an author. Now we see the needed header and body that we have added to the page template.

author page view

However, if we log in as users with other WordPress rights, the page template we have set will not be displayed, as we included only the “Author” role.

In the current case, the default page template of the active WordPress theme is shown.

=contributor page view

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

Was this article helpful?
YesNo

Need help?

Ask Facebook community

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

Start a live chat

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