Adding shortcode inside Widget

Custom short code can be added into standard Text Widget.

Using Text Widgets

The Text Widget is one of the most commonly used WordPress Widgets that comes with every WordPress installation. It allows users to add text, video, images, custom lists, and more to their WordPress sites.

To use the WordPress Text Widget:

  1. Go to Themes > Widgets in the WordPress Administration Panels.
  2. Open the sidebar, footer, or Theme section to which you wish to add the Text Widget.
  3. Find the Text Widget in the list of Widgets.
  4. Click and drag the Widget to the spot you wish it to appear.

Adding Shortcode to Text Widget:

  1. Click the down arrow to the right of the Text Widget title.
  2. Set the Text Widget Title (optional).
  3. Add the text shortcode ([shortcode_name]shortcode content[/shortcode_name]) or HTML code to the box or edit what is currently there.
  4. Choose the option to Automatically add paragraphs to wrap each block of text in an HTML paragraph tag (recommended for text).
  5. Click Save to save the Text Widget.
  6. Click Close to close the Text Widget.
  7. Switch tabs in your browser and preview the results and make changes if necessary.