How to Create Genesis version of Page Template?

Community Forums Forums Design Tips and Tricks How to Create Genesis version of Page Template?

This topic is: not resolved

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  SoZo 1 year, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3438

    ithacaindy
    Participant
    Post count: 47

    I have a page template, which calls the header, footer, and sidebar individually. I’d like to learn how to display the Genesis layout while maintaining my own loop and output. When I add genesis();  to the following code, I just get a white screen. Without the genesis call, the template displays the page contents, followed by posts with tags matching the page’s title. However, the sidebar is out of alignment.

    <!--?php /*
    Template Name: Tag Page
    */
    get_header();
    ?>

    <!-- Display the intro text. -->

    <!-- -->


    <hr>


    <!--?php $myposts = get_posts('numberposts=-1');
    foreach($myposts as $post) :
    $showit = "no";
    $posttags = get_the_tags();
    if ($posttags) {
    foreach($posttags as $tag) {
    if(strtolower($tag->name)==strtolower($tagpage)) {
    $showit = "yes";
    }
    }
    }
    ?>


    <a href=""></a>

    <!--?php endforeach;

    get_sidebar();
    get_footer();?>

    • This topic was modified 1 year, 9 months ago by  ithacaindy. Reason: Added code tags
    • This topic was modified 1 year, 9 months ago by  ithacaindy.
    • This topic was modified 1 year, 9 months ago by  ithacaindy. Reason: Added code tags
    • This topic was modified 1 year, 9 months ago by  ithacaindy.
    #16250

    SoZo
    Moderator
    Post count: 1573

    Your PHP opening tags are messed up. They should be <?php not <!–?php. And you don't need the header, sidebar or footer calls since that is all handled by genesis();

    A bare page template looks like
    [php]<?php
    /*
    Template Name: THE_TEMPLATE_NAME_GOES_HERE
    */

    genesis();[/php]


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

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

You must be logged in to reply to this topic.