Community Forums › Forums › Archived Forums › General Discussion › Genesis Sample help to create custom page template
- This topic has 6 replies, 2 voices, and was last updated 11 years, 2 months ago by
timothyw.
-
AuthorPosts
-
March 9, 2015 at 9:31 pm #143877
timothyw
MemberI am going to create a custom page template with the working title "test.php"
so I can get three columns for text/images under the slider (but above the footer) on my homepage.Below is the first pass. No changes yet. But it doesn't look right. Can anyone tell me what's wrong?
I think the problem is in the line
"<?php /* Template name: Test */ ?><?php "which I added in front of the original page.php code
Once it is punctuated I think it has to go into the Genesis folder since there is no page.php file in the Genesis Sample folder
============the code for test.php==================<?php /* Template name: Test */ ?>
<?php
/**
* Genesis Framework.
*
* WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances.
* Please do all modifications in the form of a child theme.
*
* @package Genesis\Templates
* @author StudioPress
* @license GPL-2.0+
* @link http://my.studiopress.com/themes/genesis/
*///* This file handles pages, but only exists for the sake of child theme forward compatibility.
http://www.securitytechmaster.com
genesis();
===============end of code for test.php================
ThanksMarch 9, 2015 at 11:22 pm #143882Brad Dalton
ParticipantUsing a code editor, copy and paste the following PHP code into a new file and name it page_custom.php in your child themes root directory.
<?php /* Template Name: Custom Template */ //* Add landing body class to the head add_filter( 'body_class', 'add_body_class' ); function add_body_class( $classes ) { $classes[] = 'custom-template'; return $classes; } //* Run the Genesis loop genesis();
March 10, 2015 at 9:37 am #143917timothyw
Memberthat went well.
I am at the point where I altered the attribute for my slider page to the custom template, and it opens.
I got to figure out what's next!
thanksMarch 11, 2015 at 4:22 am #143983Brad Dalton
ParticipantUse some of the code snippets in the †emplate like the add and remove actions http://my.studiopress.com/snippets/
March 11, 2015 at 9:28 am #144013timothyw
MemberThanks.
I'll try those code snippets right now.
Even though the new template was not crashing my pages,
applying it showed no affects to my pages' appearance
so I was scrambling to figure out what to do next.I think enrolling into a WP course is pretty much mandatory for me if I am ever to be able to walk erect.
I'll advise and thanks for your follow up
March 11, 2015 at 5:22 pm #144097Brad Dalton
ParticipantMarch 11, 2015 at 8:12 pm #144116timothyw
MemberI have to admit I did not understand which one to select.
I have been looking at some plugins (Custom Sidebars; Genesis Simple Sidebars; feature a page widget)
but have yet to get anything going -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.