ProBeaver Weekly
Weekly for all things Beaver

Show different content in sidebar widgets with Beaver templates

If you are building a website layout that has sidebar enabled throughout, then you may want to display different sidebar content one or more specific pages. One can easily do this on any WordPress theme using Beaver Builder plugin. However, you would need a paid version of the Beaver Builder plugin as free version does not support template shortcodes.

Step 1: Enabled shortcode execution in widgets

*** Backup before making changes ***
By default, shortcodes do not execute when placed in a text widget and added to the “Primary Sidebar” widget area. So, first we need to enable this.
1. In WordPress dashboard, go to: Appearance > Editor.
2. Click Theme Functions (functions.php) file.
3. Add following code at the bottom of this file and save changes.

Step 2: Create a template in Beaver Builder

1. In WordPress dashbaord, go to: Settings > Pages Builder.
2. Click “Templates” option and then click to check “Enable Templates admin” option.
3. Click “Save Template Settings” button at bottom.

Enable templates in beaver builder

4. Now you should see new “Templates” option in the left panel of the WordPress dashboard. Go to: Templates > Add New and start creating a new Beaver template.
5. Once template is created, take note of the template URL to build a shortcode.

For example: If template URL is ( ), see the correponding shortcode in the screenshot below. Read more about Beaver plugin shortcodes.

Step 3: Setup conditional feature via “Widget Context

1. Download the Widget Context plugin. Then install and activate it.
2. Go to: Appearance > Widgets. Now add a text widget to “Primary Sidebar” widget area.
3. Enter shortcode for your Beaver template.
4. Check at bottom of the widget for all conditional options. For example: if you want to display this only on about page, then you can add /about/ in “target by URL” box (assuming your about page lives at )

Beaver shortcode in widgets in primary sidebar

Experiment with various conditional settings for a complete custom implementation and control of your sidebar area throughout the website. Of course…. powered by Beaver Builder!

Davinder Singh Kainth

About Davinder Singh Kainth

Davinder loves creating and implementing online spaces. He has over a decade of experience reaching corners of: design, development, blogging and SEO. He also create products at SimpleProThemes(.com), WordPress learning at BasicWP(.com) & digital solutions at iGuiding(.com)


  1. George on October 25, 2017 at 8:40 pm

    Hi Davinder. You left out the code snippet for allowing shortcode in sidebar widgets. I have it from a video by Grant Ambrose, but maybe other visitors could use it. At any rate, thanks for this – very useful for an ex-Woothemes Canvas user who’s converting sites in advance of WordPress changes coming in 2018 that will make Canvas incompatible (Project Gutenberg). Canvas is no longer being maintained; just bug fixes from now on.

    • George on October 25, 2017 at 8:41 pm

      p.s. Oh, I see where the code magically appeared – I guess I had javascript turned off in the browser.

Leave a Comment

Become a Beaver Builder Expert

Pre-order "Mastering Beaver Builder" course and save $100 directly.