Display Home Welcome Widget Sitewide

If your theme includes a home welcome widget, you may want to display that content side wide rather than just on the home page.

The Agency theme by StudioPress includes one which this code is based on.

Simply add one of these 2 code snippets to the end of your child themes functions.php file.

The only difference between the 2 snippets is the position in which your welcome content display on the page.

Try them both, one at a time, to see which one you prefer.

Styling

There’s no need to add CSS code unless you’re using a theme other than Agency in which case you have 2 options.

Change the class in PHP code from home-welcome to your themes widget class so your widget is styled the same as existing widgets.

Or use it in a new CSS rule with new declarations, in your child themes style.css file.

Note: If you’re using the 2nd code snippet which outputs using the before_content_sidebar_wrap hook, you will need to change the text color as its white for the home page (on a black background) and it will display before your content on all other pages which use a white background.

2 responses to “Display Home Welcome Widget Sitewide”

  1. Hi Brad, will this work for the executive theme?With thanks, Ken.

    1. Brad Dalton Avatar
      Brad Dalton

      Hello Ken.

      The method will but the code would be different.

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.