• 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

new 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 › Design Tips and Tricks › new page template

This topic is: resolved
  • This topic has 2 replies, 1 voice, and was last updated 12 years, 3 months ago by staceyzav.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • March 12, 2013 at 11:15 am #25666
    staceyzav
    Member

    Hi -

    I would like to create 3 different page templates  that have a unique sub header under the main header (one for video, one for image and one for a gallery).  I know enough to know that I need to create a hook after the header and I have the HTML and PHP code ready and working for each unique header, but I'm not sure how to format my code.  If someone can get me cleared up on one, I can figure out the rest.

    SO - here is what I have so far - but it isn't quite there - can someone help me clean it up and it get into a working page template?  Thanks in advance!

    `<?php
    /*
    Template Name: Video Header
    */

    /** Force the full width layout on the Portfolio page */
    add_action( 'genesis_after_header' );

    <div class="shadow-top"></div><div class="topbar"><div class="hero"><a data-titan-lightbox="on"  href="<?php the_field('video_url'); ?>"> <div class="play2"></div><?php the_post_thumbnail(); ?></a></div>

    <div class="discoverform"><h4>Receive Property Information</h4>
    <?php gravity_form($id_or_title, $display_title=true, $display_description=true, $display_inactive=false, $field_values=null, $ajax=false, $tabindex); ?></div>
    </div><div class="clear"></div><div class="shadow-bottom"></div>

    genesis();`

    I have the following as a start - is there anyway someone can help me clean it up?

    Thanks!

     

    March 12, 2013 at 11:26 am #25668
    staceyzav
    Member

    I just realized that I kept in a comment from the template I recycled, so /** Force the full width layout on the Portfolio page */ has nothing to do with what I'm trying to do here.

     

    Thanks

    March 12, 2013 at 11:42 am #25672
    staceyzav
    Member

    Never mind - figured it out:

    Here is the new template:

    <?php
    /*
    Template Name: Video Header
    */

    /** Force the full width layout on the Portfolio page */
    ?>
    <?php add_action( 'genesis_after_header', 'videosubhead' ); ?>

    <?php genesis(); ?>

     

    then added the videosubhead HTML and PHP to my functions file!

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘new page template’ is closed to new replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 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