Where to write code in page template – agency theme

Community Forums Forums General Discussion Where to write code in page template – agency theme

This topic is: resolved

Tagged: , , ,

This topic contains 1 reply, has 2 voices, and was last updated by  nutsandbolts 9 months, 4 weeks ago.

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

    Bart
    Participant
    Post count: 5

    I have been trying to add extra code in my page template, but no matter where I put it, it messes up the design of the page,
    The page becomes just white with the standard genesis code written out and then the post or page, without any layout.

    For example, I want to display featured pages in a specific page. So a list of pages with their image and an exerpt. I have found this piece of code on another forum:

    <?php
    $post_id = 1;
    $queried_post = get_post($post_id);
    $title = $queried_post->post_title;
    echo get_the_post_thumbnail($post_id);
    echo “<h2>” . $title . “</h2>”;
    echo “<p>” . $queried_post->post_excerpt . “</p>”;
    ?>

    But I just can’t figure out in which position to paste it in my Genesis Page Template in order for it to properly function.

    #75461

    nutsandbolts
    Moderator
    Post count: 3131

    I see this is marked as resolved but just wanted to check to make sure you didn’t check it by accident. Let us know if you still need help!


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

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

You must be logged in to reply to this topic.