How to Add Shortcodes in WordPress Text Widget

Add Tool

Add Shortcodes in WordPress Text Widget


Add Shortcodes in WordPress Text Widget

Hello guys want to add shortcodes in WordPress text widget? Some days ago I shared a tip on using PHP snippets within Wordpress text Widgets. Here’s another equally handy snippet for using Shortcodes within the WordPress text widget.

To allow shortcodes in sidebar widgets, simply edit the functions.php file from your theme and add the following code

add_filter('widget_text', 'do_shortcode');

Once you saved the file, you can now add as many shortcodes as you want in WordPress sidebar widgets.

How to edit functions.php file?

If you do not know how to edit fuctions.php file Please follow below steps to edit WordPress functions.php file

  1. Log into your WordPress Dashboard
  2. Under “Appearance” click “Editor” (if you cant see this it might be disabled – if so contact the company who created your theme)
  3. In the list of files on the right of the page, click “functions.php”
  4. At the bottom of the functions.php file, add the above code.

Tags: Add Shortcodes in WordPress Text Widget, wordpress text widget, text widget, text message widget, tkinter text widget, text to speech widget
Payza

About Masum Billah

Add Shortcodes in WordPress Text Widget 1stWebSuite website seo tool is a free website ranking tool site provides a lot of on page and off page seo useful tools for you. On this site, we have a large number of website ranking tools


SIGN UP TO GET UPDATE TO YOUR INBOX




Discuss about: How to Add Shortcodes in WordPress Text Widget


adf.ly