• 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

Put Welcome Message Widget on All Posts

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 › Put Welcome Message Widget on All Posts

This topic is: resolved
  • This topic has 2 replies, 2 voices, and was last updated 11 years, 5 months ago by Tony.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • February 6, 2014 at 6:19 pm #89041
    Tony
    Member

    How do I make it so that the welcome message widget displays on all pages? Right now it only displays on the home page.

    I tried adding || is_single to the following code in my functions.php file, but it didn't work. Can anyone help?

    //* Hook welcome message widget area before content
    add_action( 'genesis_before_loop', 'beautiful_welcome_message' );
    function beautiful_welcome_message() {
    
    	if ( ! is_front_page() || get_query_var( 'paged' ) >= 2)
    		return;
    
    	genesis_widget_area( 'welcome-message', array(
    		'before' => '<div class="welcome-message" class="widget-area">',
    		'after'  => '</div>',
    	) );
    
    }
    February 6, 2014 at 10:26 pm #89072
    nutsandbolts
    Member

    It should work like this:

    //* Hook welcome message widget area before content
    add_action( 'genesis_before_loop', 'beautiful_welcome_message' );
    function beautiful_welcome_message() {
    	genesis_widget_area( 'welcome-message', array(
    		'before' => '<div class="welcome-message" class="widget-area">',
    		'after'  => '</div>',
    	) );
    
    }

    The conditional in your snippet above is saying "if we aren't on the homepage, don't show the widget area." So by removing it, it should show on every single page of the site.


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

    February 7, 2014 at 8:21 am #89124
    Tony
    Member

    I see. I saw the "is not" statement, but I couldn't figure out what they were doing. Since I don't want it on pages, I made the code like this:

    //* Hook welcome message widget area before content
    add_action( 'genesis_before_loop', 'beautiful_welcome_message' );
    function beautiful_welcome_message() {
    
    	if (  is_front_page() || get_query_var( 'paged' ) >= 2 || is_single())
    		
    
    	genesis_widget_area( 'welcome-message', array(
    		'before' => '<div class="welcome-message" class="widget-area">',
    		'after'  => '</div>',
    	) );
    
    }

    Thanks for the help!

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 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