Custom Page Template

Community Forums Forums Design Tips and Tricks Custom Page Template

This topic is: not resolved

Tagged: ,

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

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

    charriott4
    Participant
    Post count: 60

    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

    #10606

    itsonlybarney
    Participant
    Post count: 15

    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.

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

You must be logged in to reply to this topic.