Discover in this tutorial how to add more pages, besides the home page, to the One-Click Theme Setup (OCTS), also known as Genesis onboarding, in a Genesis child theme.
The Genesis Framework 2.8 update added the One-Click Theme Setup (OCTS) or Genesis onboarding.
Its function? To reduce frustration when setting up a theme. 😉
As you saw in the tutorial on how to add it to any Genesis child theme, this process aims to reduce the gap between what you see in a child theme demo and what you find when you activate it in your WordPress.
In that tutorial you saw how to set up the home page and in this one you’ ll learn how to enter other pages, such as About Me or Contact Us.
I recommend that you first read and follow the instructions on how to create an OCTS in Genesis, because with this tutorial you modify and expand that code.
Steps to insert more pages in Genesis onboarding
1. Modify the file onboarding.php
Once you have the configuration files, replace the following code in the file onboarding.php:
To see this and another 1097 code snippets of this website, login or subscribe here.
With this block you create 3 pages:
- Main page.
- About me.
- Contact.
But this is just an example so you know how to enter the ones you are interested in.
2. Add a file with the content of the pages
If you have followed the first tutorial you will already have a folder structure such as /config/import/content/homepage.php. That is, you already have the file with the contents of the home page.
Now you must generate the About Me and Contact files.
Create a file called about-page.php with the following code:
To see this and another 1097 code snippets of this website, login or subscribe here.
It is important that you add the content of the pages with your own designs for About Me and Contact between“<<CONTENT” and “CONTENT;” as I explained in the first tutorial.
Do you want to add images? In that case remember to apply the advice I gave you in that same tutorial to create your onboarding.
3. Create page templates
Finally, you can configure the design of the layout you want to display on the newly added pages.
To do this, it creates a file called template-blocks-about.php with the following code and place it in the root of your Genesis child theme.
To see this and another 1097 code snippets of this website, login or subscribe here.
With this block you tell the design to be full width and not to show the breadcrumbs or the title.
But you can adjust it to your liking by using the action hooks and filters that you will find in other Genesis Code tutorials.
Do the same for the contact page, creating a template-blocks.contact.php:
To see this and another 1097 code snippets of this website, login or subscribe here.
If you are going to use the same design for several pages you can use a single template.
Remember that to take advantage of this new feature you must use versions equal to or greater than WordPress 5.0 and Genesis 2.8.
You’ve got it! You have added more pages to the the One-Click Theme Setup.
Conclusions
Want to take advantage of the new Genesis onboarding and add more pages in addition to the main one?
Now you know how to do it easily and 100% customizable.
Thanks to this, your Genesis child theme will be able to create and leave as in the demo several pages, not only the home page.
If you have any question, please leave it in the comments. And if you want to give me a suggestion for future snippets, please send it through the contact form.
Benefits of being a subscriber. 🙂