• 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

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

This topic is: not resolved

Tagged: loop, widget areas

  • This topic has 1 reply, 2 voices, and was last updated 10 years, 4 months ago by itsonlybarney.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • January 6, 2013 at 2:42 pm #9971
    charriott4
    Member

    Im working on a custom page template on the education theme and so far all is going well. All I want to do to finish it is to add the page loop after the custom widget. I've tried adding "add_action( 'genesis_loop', 'genesis_do_loop' );" to the end but its not working.

    Can someone please be kind enough to assist me?

    http://avance.myprowebsolutions.com/about/

    <?php

    /*
    Template Name: About
    */

    add_action( 'genesis_meta', 'custom_page_genesis_meta' );
    /**
    * Add widget support for homepage. If no widgets active, display the default loop.
    *
    */
    function custom_page_genesis_meta() {

    if ( is_active_sidebar( 'page-welcome' ) || is_active_sidebar( 'home-slider' ) ) {

    remove_action( 'genesis_loop', 'genesis_do_loop' );
    add_action( 'genesis_before_content_sidebar_wrap', 'custom_page_welcome_helper' );
    add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );

    }
    }

    function custom_page_welcome_helper() {

    if ( is_active_sidebar( 'page-welcome' ) ) {
    echo '<div id="page-welcome">';
    dynamic_sidebar( 'page-welcome' );
    echo '</div><!-- end #page-welcome -->';
    }

    if ( is_active_sidebar( 'home-slider' ) ) {
    echo '<div id="home-slider">';
    dynamic_sidebar( 'home-slider' );
    echo '</div><!-- end #home-slider -->';
    }

    }
    genesis();


    Web Designs By Chrissy | Twitter @designbychrissy

    Follow Me On Facebook

    January 8, 2013 at 11:28 pm #10606
    itsonlybarney
    Member

    Let me see if I am correct in what you want, for the about page, you want to add two widget areas before the page content that is on a full width page?

    If I am correct in thinking what you are wanting, simply remove the line:

    remove_action( ‘genesis_loop’, ‘genesis_do_loop’ );

    and the loop should stay active on the page, and the widget areas you have added will be inserted outside the content-sidebar wrap.

  • 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

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