• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2762

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Premium Access
  • Log in

Example of How To Code a Custom Page Template For Genesis With Widgets

Many Genesis beginners take some time to understand the way page templates are coded in Genesis.

Parent themes like Twenty Fifteen and other default themes are coded differently so it takes a bit of getting used to when you switch to Genesis.

There’s no need to add markup to a custom page template as it already includes the genesis(); tag which outputs the default page markup and hooks.

All you need to do is add your custom code for the widgets and all the hooks and markup are already included in the genesis(); function. If you want to remove any of the default page markup, you can simply by adding remove_action for the default function which prints the markup. You can also use add_action to add more functionality like widgets as you can see in this custom page templates code below.

This tutorial for members includes code which creates a mobile responsive page template with widgets that display before and after the content area like you see in the following screenshot:

genesis-page-template

Here’s the code for the new page template and your child themes functions file.

Register for full access

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
 

Loading Comments...
 

You must be logged in to post a comment.