• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Genesis Sample help to create custom page template

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Genesis Sample help to create custom page template

This topic is: not resolved

Tagged: Genesis create a custom page template

  • This topic has 6 replies, 2 voices, and was last updated 11 years, 2 months ago by timothyw.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • March 9, 2015 at 9:31 pm #143877
    timothyw
    Member

    I 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.
    genesis();
    ===============end of code for test.php================
    Thanks

    http://www.securitytechmaster.com
    March 9, 2015 at 11:22 pm #143882
    Brad Dalton
    Participant

    Using 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();
    

    Tutorials for StudioPress Themes.

    March 10, 2015 at 9:37 am #143917
    timothyw
    Member

    that 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!
    thanks

    March 11, 2015 at 4:22 am #143983
    Brad Dalton
    Participant

    Use some of the code snippets in the †emplate like the add and remove actions http://my.studiopress.com/snippets/


    Tutorials for StudioPress Themes.

    March 11, 2015 at 9:28 am #144013
    timothyw
    Member

    Thanks.

    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 #144097
    Brad Dalton
    Participant

    What code did you add?


    Tutorials for StudioPress Themes.

    March 11, 2015 at 8:12 pm #144116
    timothyw
    Member

    I 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

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble