Before you start, check the tutorial requirements:
- JetThemeCore plugin installed and activated
- Premade header, body, and footer templates. Such templates can be built in Gutenberg or Elementor and must be included in the page template.
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.
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.
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.
For instance, we include the “Author” WordPress role.
Press the “Add Condition” button to adjust one more condition if needed.
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.
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.
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.
Like that, you can now include or exclude any desired WordPress roles for the needed JetThemeCore page template.