Add sidebars to WordPress posts and pages using shortcodes with a sidebar Name or ID.
Method 1 – (Recommended Use: Add a sidebar using a sidebar Name.)
A sidebar Name can be found in the Appearance > Widgets
section of your WordPress Admin Area.
Example uses:
[sidebar name="your-sidebar-name"]
[sidebar name="your-sidebar-name" class="custom-class"]
[sidebar name="your-sidebar-name" class="custom-class-1 custom-class-2 custom-class-3"]
Method 2 – (Advanced WP Users: Add a sidebar using a sidebar ID.)
A sidebar ID can be found in your theme’s register_sidebar
functions, usually in the theme’s functions.php
file.
Example uses:
[sidebar id="your-sidebar-id"]
[sidebar id="your-sidebar-id" class="custom-class"]
[sidebar id="your-sidebar-id" class="custom-class-1 custom-class-2 custom-class-3"]
General Notes
[sidebar]
shortcode without an active sidebar Name or active sidebar ID displays nothing.HTML Class Notes
Method
sections above.Plugins
menu in your WordPress Admin Area or upload the plugin folder to the /wp-content/plugins/
directory.Plugins
menu in your WordPress Admin Area.How to Use
section.Either no widgets are in the desired sidebar or the shortcode attributes are incorrect. See instructions in the above How to Use
section.
Sidebar Names can be found in the Appearance > Widgets
section of your WordPress Admin Area. See the Method
sections and Screenshots
section for details.
Advanced WP users can find sidebar IDs in the active theme’s register_sidebar
functions, usually in the theme’s functions.php
file.
See the Method
sections and Screenshots
section for details.
See also: https://codex.wordpress.org/Function_Reference/register_sidebar
There is no limit to the number of custom classes.
Yes, but a valid sidebar ID will override a sidebar Name if both are present in the same shortcode.