• 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

Altitude Pro: add widget area to home page and one other page only

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 › General Discussion › Altitude Pro: add widget area to home page and one other page only

This topic is: resolved

Tagged: Altitude Pro

  • This topic has 6 replies, 2 voices, and was last updated 8 years, 11 months ago by MissKitty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • November 6, 2017 at 10:42 am #213320
    MissKitty
    Participant

    I'm trying to register and display a widget area on the home page and contact page of my client's site. I can get it to display on the contact page just fine, but not on the home page.

    The link to my dev site link is here (please forgive the rudimentary stage it's in).

    My functions.php code:

    //* register testimonials widget jlr
    
    genesis_register_sidebar( array(
    	'id'		=> 'testimonials-widget',
    	'name'		=> __( 'Testimonials Widget', 'altitude-pro' ),
    	'description'	=> __( 'This is the testimonials widget area for home and contact page.', 'altitude-pro' ),
    ) );
    
    //* Add the page widget in the content - HTML5
    add_action( 'genesis_entry_footer', 'mwi_add_testimonials' );
    function mwi_add_testimonials() {
    	if ( is_home() || is_front_page() || is_page(‘703’) )
    	genesis_widget_area ('testimonials-widget', array(
            'before' => '<div class="testimonials-widget"><div class="wrap">',
            'after' => '</div></div>',
    	) );
    }
    

    Any help would be greatly appreciated, and well worth the cost of a few cups of coffee donated via Paypal 🙂

    Thanks in advance.

    http://mwi.dev.onpressidium.com
    November 6, 2017 at 10:51 am #213323
    Brad Dalton
    Participant

    Works when i test it.


    Tutorials for StudioPress Themes.

    November 6, 2017 at 10:56 am #213325
    MissKitty
    Participant

    So I must have mucked something up?

    November 6, 2017 at 11:00 am #213326
    Brad Dalton
    Participant

    No. You are using a custom front page template which includes widget areas. The code only works when using the loop so you'll need to modify it.

    Where did you want the widget to output on the front page?


    Tutorials for StudioPress Themes.

    November 6, 2017 at 12:01 pm #213329
    MissKitty
    Participant

    I wanted it just before the footer, so it sits flush up against the footer and is full-width (I tried using the genesis_before_footer hook but it didn't work).

    Here are two screenshots showing, I hope, what I'm trying to accomplish:
    Home page....
    Contact page....

    November 7, 2017 at 11:13 am #213361
    Brad Dalton
    Participant

    Tested using the genesis_before_footer hook and it works.


    Tutorials for StudioPress Themes.

    November 7, 2017 at 11:25 am #213362
    MissKitty
    Participant

    Hi Brad,
    Good timing! I was just about to post here that I got it to work 🙂

    //* register testimonials widget jlr
    
    genesis_register_sidebar( array(
    	'id'		=> 'testimonials-widget',
    	'name'		=> __( 'Testimonials Widget', 'altitude-pro' ),
    	'description'	=> __( 'This is the testimonials widget area for home and contact page.', 'altitude-pro' ),
    ) );
    
    //* Add the page widget in the content - HTML5
    add_action( 'genesis_before_footer', 'mwi_add_testimonials', 1 );//'genesis_entry_footer',
    function mwi_add_testimonials() {
    	if ( is_home() || is_front_page() || is_page('get-in-touch') )//is_page('703')
    	genesis_widget_area ('testimonials-widget', array(
            'before' => '<div class="testimonials-widget"><div class="wrap">',
            'after' => '</div></div>',
    	) );
    }
    
  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Altitude Pro: add widget area to home page and one other page only’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

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