Forum Replies Created
-
AuthorPosts
-
TitanMember
Well..good effort on my part. Appears I still need to add some settings to the customize.php in order to get the image selector to show up in the Customize area on the backend.
So this is part of the equation.
TitanMemberI was curious about how to recreate the homepage (front-page) for other pages as well. I am new to Genesis and php but was able to figure it out fairly easily. Fortunately, Altitude is a very lightweight and compact theme so there was not a lot of code to replicate. If anyone else is interested in recreating the homepage of Altitude, here are the steps that I took.
1) Create a new .php file for the page you want to create. I called mine new-page.php for this example.
2) Open the front-page.php file in the altitude-pro directory of your child theme. Copy the contents of the front-page.php and paste them into the new-page.php file.
3) Add the following line to the top of the new-page.php/* Template Name: New Page */
Add it right below this section:
/** * This file adds the New Page template to the Altitude Pro Theme. * * @author StudioPress * @package Altitude * @subpackage Customizations */
4) Next I went through the new-page.php file and changed every instance of "front-page" to "new-page". If you are using Notedpad++ there is a Search function to make finding each instance easier and ensure you do not miss one.
5) Now it is time to register to register the new widget locations for new-page.php. Open the functions.php file and copy and paste the following code at the bottom of the page:
//* Register new-page widget areas genesis_register_sidebar( array( 'id' => 'new-page-1', 'name' => __( 'New Page 1', 'altitude' ), 'description' => __( 'This is the new page 1 section.', 'altitude' ), ) ); genesis_register_sidebar( array( 'id' => 'new-page-2', 'name' => __( 'New Page 2', 'altitude' ), 'description' => __( 'This is the new page 2 section.', 'altitude' ), ) ); genesis_register_sidebar( array( 'id' => 'new-page-3', 'name' => __( 'New Page 3', 'altitude' ), 'description' => __( 'This is the new page 3 section.', 'altitude' ), ) ); genesis_register_sidebar( array( 'id' => 'new-page-4', 'name' => __( 'New Page 4', 'altitude' ), 'description' => __( 'This is the new page 4 section.', 'altitude' ), ) ); genesis_register_sidebar( array( 'id' => 'new-page-5', 'name' => __( 'New Page 5', 'altitude' ), 'description' => __( 'This is the new page 5 section.', 'altitude' ), ) ); genesis_register_sidebar( array( 'id' => 'new-page-6', 'name' => __( 'New Page 6', 'altitude' ), 'description' => __( 'This is the new page 6 section.', 'altitude' ), ) ); genesis_register_sidebar( array( 'id' => 'new-page-7', 'name' => __( 'New Page 7', 'altitude' ), 'description' => __( 'This is the new page 7 section.', 'altitude' ), ) );
6) Next I went into the lib folder and opened output.php. Here there is a section starting with "foreach". I copied the "if" statement and then pasted this below it:
if( is_new_page() ) { $css .= ( ! empty( $section ) && ! empty( $background ) ) ? sprintf( '.new-page-%s { %s }', $section, $background ) : ''; }
7) Finally came the CSS. I opened the style.css and again using the Search function in Notepad++ copied and pasted each instance of ".front-page" and replaced it with ".new-page".
I am not sure if all of these steps were necessary. It seems I should have been able to use the existing front-page css stylings for the new-page css. However, I figured if I wanted to isolate changes later on it was best to go ahead and have its own css entries.
To be able to use your newly created page you will need to go to Pages > Add New and create a new page and select the template name that you created back in step 3. Save the new page and then be sure to add it to your menu structure.
To edit the new page, go to Appearance > Customize and then use the menu navigation to navigate to New Page and from there you should able to start editing the widgets just like on your homepage.
Hope this helps someone to be able to customize this theme. It is a pretty nice and simple to work with. I am actually wanting to create a new Page Template for this theme. This was a way of drilling into the php and seeing how everything fits together. If anyone has any advice for creating Page Templates in general I would appreciate any feedback or suggestions.
-
AuthorPosts