Creating a custom page template which is the same as your home page template isn’t difficult.
There’s different ways to do this depending on which child theme you are using.
Lets take a look a one method you can use to duplicate your home.php file and use a page template anywhere on your site.
Copy & Rename Home.php File
Here’s the code you can use in a new file named custom.php for your page template.
It includes all the home page widgets which have been renamed to custom.
Copy & Rename Register Widgets in Functions.php
Next step is to copy the functions for registering the homepage widgets and rename them from home-top etc to custom-top etc.
Copy Home CSS Classes & Rename to Custom
The final step is to use a text editor like Notepad++ and search and find all CSS code using the home class.
Paste this code into a new text file and search, find and replace home with custom. You can then paste the code at the end of your child themes style.css file.
Modifications
Clearly, you’ll need to modify the CSS code so it only effects the styling of your custom page template with widgets. Some of the styling for the home page is also used for styling sidebars so you may want to remove those classes from the code.
More Than One Slider
If you’re using the Genesis Responsive slider on the home page you won’t be able to use it on your custom page template unless you want it to output exactly the same images as your homepage.
Try using another slider plugin like Easing Slider or Slide Deck if you want to display videos or other custom content in your slider.
Using the Easing slider you can add another Slider which displays unique content by changing the is_home conditional tag to is_page (007) in the code and paste it into the Genesis Simple Hooks field in the location you want to display the slider.
Custom Sidebar For Custom Page Template
You could also easily display a custom sidebar with widgets on the same page you display your custom page template using Genesis Simple Sidebars or the custom Sidebars plugin.
More Widget Area’s
You could also add more custom widget area’s to your custom page template using conditional tags.
Here’s a tutorial about how to add a widget area before your content sidebar wrap (before custom-top widget). Simply change the conditional tag to is_page() and add the post i.d for your custom widgetized page template.
Leave a Reply
You must be logged in to post a comment.