• 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

Custom Page Template with Loop and Content

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 › Custom Page Template with Loop and Content

This topic is: not resolved

Tagged: post_content

  • This topic has 1 reply, 2 voices, and was last updated 12 years, 6 months ago by cehwitham.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • April 30, 2013 at 3:03 pm #38632
    sarova
    Member

    Hello All-

    I am trying to create a custom page template that will include a custom loop but I would also like to include the content. But the key is, I need my content below the loop. I have tried different hooks and filters, but I am not quite there. When I put the 'genesis_do_post_content' , i am putting it outside the content area, so I do not have a div so I can style the page. So I would like to add a div to the add_action. Below is copy of my template for the page, I might be doing it all wrong. Thanks in advance for your help.

     

    I would like to add new styling for this, add_action('genesis_after_content','genesis_do_post_content'); - I am not sure how to accomplish.

    <?php
    /*
    * Template Name: Engineering Home Page
    */

    /**
    * This removes the loop.
    * If you want to include the static page title and content,
    * remove or comment out this code.
    */

    add_filter ( 'genesis_before_content', 'dms_custom_header' );

    function dms_custom_header () {
    echo '<div id="page_featured">';
    echo the_post_thumbnail( 'slider' );
    echo '</div>';

    }

    remove_action( 'genesis_loop', 'genesis_do_loop' );

    add_action ( 'genesis_after_content', 'childtheme_about_loop' );
    function childtheme_about_loop() {

    if(is_active_sidebar('engineering')){

    dynamic_sidebar('engineering');
    }
    }

    add_action('genesis_after_content','genesis_do_post_content');

    genesis();


    Debbie Saro

    http://premierac.com/premier-automation-engineering/
    June 2, 2013 at 5:44 pm #43712
    cehwitham
    Participant

    Hi Debbie,

    What happens if you use the_content rather than genesis_do_post_content?

    Also have you considered using the blog page template then just adding the content in? Something like:

    `
    function news_title(){
    the_title();
    the_content();
    }
    add_action('genesis_after_loop','news_title');`


    Twitter: cehwitham Web: cehwitham.com

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ 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

© 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