How To find Widget shortcode to use it Outside The Sidebar in WordPress theme

We all know about the widgets in WordPress. Generally we use widgets always in sidebar or any other widgetized area.

Sometimes the question arises, is that the only way to use a widget, is that possible to use those widgets outside the sidebar?

YES, with Widget Shortcode plugin it is possible to using widget outside the sidebar.

This plugin adds a shortcode with any widget which enables you to output widget anywhere you like.

[notification type=”alert-info” close=”false” ]You may also like our article Create Custom Widget Area in WordPress

Let’s find widget shortcode to use it outside the sidebar

To display a widget you need to find widget shortcode. To create a shortcode you need to find a widget id.

[widget id="text-1"]

The above code will output a text widget but the question is, where you can find the widget id? This plugin will output the widget id below the widget you add in a new widget area called ‘Arbitrary’.

When you activate the widget a new widget area named ‘Arbitrary’ is created. It adds and display a shortcode to any widget added in the ‘Arbitrary’ widget area.

  1. Install & activate the plugin Widget Shortcode .
  2. After successfully activation of this plugin you need to go Appearance -> widgets. Here you can see a new widget area named ‘Arbitrary’. This is the place where you can get shortcode for any widget.

find widget shortcode to use in wordpress theme

3. Add any widget in Arbitrary section and click on Save. Now you will get a shortcode for that widget. Copy that shortcode.

find widget shortcode

4. Paste the shortcode to any page or post.

find widget shortcode

You can add multiple widget to get it’s shortcode and place it anywhere in your WordPress theme.

You can further style your widget by adding some CSS code to your theme.

All done, in this way you can show any widget to anywhere you want in your WordPress theme.

2 thoughts on “How To find Widget shortcode to use it Outside The Sidebar in WordPress theme”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.