Community Forums › Forums › Archived Forums › General Discussion › Outreach Pro – custom template
Tagged: custom template, Outreach Pro
- This topic has 6 replies, 3 voices, and was last updated 9 years, 3 months ago by
black9design.
-
AuthorPosts
-
August 29, 2014 at 10:38 am #121717
lizmsolutions
ParticipantI know that I am probably missing something small and I'm going to "smack myself in the forehead" once I get this figured out - but for now, I am stuck.
I am trying to create a custom template for outreach pro -- I want the custom template to mimic what I have set for the homepage --
sidebar - content - sidebar --- with a widget area in the middle before the page content ---
here is the site: http://lizmcreations.com/library1/ -- that is the page I want to "replicate" within a few of the inner pages, but it is only valid for the homepage and I am not quite getting how to set that exact template up.
Thank you in advance for the assistance!!
Liz
http://lizmcreations.com/library1/August 29, 2014 at 11:50 am #121724Brad Dalton
ParticipantCan't tell from the link but you can copy and rename the home.php file
You'll also need to copy the code which registers the widgets in your functions file.
All functions need to use unique names and widgets need to use unique I.D's.
August 29, 2014 at 1:43 pm #121738lizmsolutions
ParticipantI wish it were that simple - but the code is specific to the home page and while I can see where it is obvious that it says "home" -- I'm struggling with what exactly to replace it with.
That is the homepage code - again, I am sure it is something simple that I am completely missing - I'm just stumped ...
<?php /** * This file adds the Home Page to the Outreach Pro Theme. * * @author StudioPress * @package Outreach Pro * @subpackage Customizations */ add_action( 'genesis_meta', 'outreach_home_genesis_meta' ); /** * Add widget support for homepage. If no widgets active, display the default loop. * */ function outreach_home_genesis_meta() { if ( is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-bottom' ) ) { //* Force full-width-content layout setting add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); //* Add outreach-pro-home body class add_filter( 'body_class', 'outreach_body_class' ); //* Remove breadcrumbs remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); //* Remove the default Genesis loop remove_action( 'genesis_loop', 'genesis_do_loop' ); //* Add home top widgets add_action( 'genesis_loop', 'outreach_home_top_widgets' ); //* Add home bottom widgets add_action( 'genesis_before_footer', 'outreach_home_bottom_widgets', 1 ); } } function outreach_body_class( $classes ) { $classes[] = 'outreach-pro-home'; return $classes; } function outreach_home_top_widgets() { genesis_widget_area( 'home-top', array( 'before' => '<div class="home-top widget-area">', 'after' => '</div>', ) ); } function outreach_home_bottom_widgets() { genesis_widget_area( 'home-bottom', array( 'before' => '<div class="home-bottom widget-area"><div class="wrap">', 'after' => '</div></div>', ) ); } genesis();
August 29, 2014 at 3:17 pm #121747Brad Dalton
ParticipantAugust 31, 2014 at 3:23 pm #122108lizmsolutions
ParticipantOk, that worked to get the widget on the homepage, but for some reason the content from the page is not showing up below the widget -- and I am not sure what is missing from the template page to show the page content ...
Thanks again for all the help!!
Liz
August 31, 2014 at 3:49 pm #122109lizmsolutions
ParticipantFigured it out!!!
In case anyone else needs it - this is the page template code that worked:
<?php /** * This file adds the Custom Page template like home to the Outreach Pro Theme. * * @author Brad Dalton * @example http://wpsites.net/ * @copyright 2014 WP Sites */ add_action( 'genesis_meta', 'wpsites_custom_genesis_meta' ); /* Template Name: Custom Page Like Home */ function wpsites_custom_genesis_meta() { if ( is_active_sidebar( 'custom-top' ) || is_active_sidebar( 'custom-bottom' ) ) { //* Force full-width-content layout setting add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); //* Add wpsites-pro-custom body class add_filter( 'body_class', 'wpsites_body_class' ); //* Remove breadcrumbs remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); //* Remove the default Genesis loop remove_action( 'genesis_loop', 'genesis_do_loop' ); //* Add custom top widgets add_action( 'genesis_loop', 'wpsites_custom_top_widgets' ); //* Add the default Genesis loop add_action( 'genesis_loop', 'genesis_do_loop' ); } } function wpsites_body_class( $classes ) { $classes[] = 'outreach-pro-custom'; return $classes; } function wpsites_custom_top_widgets() { genesis_widget_area( 'custom-top', array( 'before' => '<div class="home-top widget-area">', 'after' => '</div>', ) ); } genesis();
August 31, 2014 at 4:10 pm #122113black9design
Membercool.
I specialize in child theme customizations and The Dynamik Website Builder
Visit me here: Black9Design.com | ParkerWadeSmith.com | AllThingsGenesis.com -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.