new page template

Community Forums Forums Design Tips and Tricks new page template

This topic is: resolved

This topic contains 2 replies, has 1 voice, and was last updated by  staceyzav 1 year, 8 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #25666

    staceyzav
    Participant
    Post count: 12

    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!

     

    #25668

    staceyzav
    Participant
    Post count: 12

    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

    #25672

    staceyzav
    Participant
    Post count: 12

    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!

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘new page template’ is closed to new replies.