BLOG

“I still suggest you call
this page 42Lab.
Works for both of us!”
- Joey

WordPress 101: Tips, Tricks & Hacks

WordPress has a lot of features on offer for its users. It is this combustibility that makes WordPress such a popular Content Management System for seasoned developers and newbies alike. WordPress’s ability to adapt to new development requirements is unparalleled when compared to other Content Management Systems in the market. 

WordPress is the first choice of many developers and website owners when they want to build dynamic websites. A dynamic website is one where you aren’t bound by stagnant design elements. In a dynamic website, the site’s functionality is empowered by fluid design elements. 

One of the most essential aspects of a dynamic website is fluid design elements like content areas that have integrated contact forms, tables, etc. To enable such dynamic design elements, a WordPress website uses Shortcodes.

How To Enable Shortcodes In Widgets?

Shortcodes are website elements that allow you to integrate additional features inside your post content area. For example the blog section on your website. Shortcodes can also be used to add dynamic elements to your website sidebar and other widget areas. Businesses can greatly benefit from shortcodes as they add additional features to your website and make your content more functional. 

To add shortcodes to your widget area you would need to jump through a lot of hoops. But worry not, as we have brought to you a quick hack to get things done in an instant! WordPress by default prohibits the execution of shortcodes on custom HTML widgets. This can be bad as developers/website owners may want to add HTML code to your customized widgets on your WordPress website.  

Now to enable shortcodes on your WordPress widgets you need to follow the following hack: 

Step 1 – Open your functions.php file and add the below code to it: 

define('widget_text', 'do_shortcode');

Step 2 – Save your functions file with the edits made. 

 

42 works

Exploring the Future of Apps with Apple

Read Blog

42Works prioritizes your privacy. Learn how we collect, use, and protect your data.

Read Policy
42 works
Get 42Works Blog updates in your Inbox!

    Virginia United States 44.203.219.117 https://42works.net/enable-shortcuts-on-widgets-in-wordpress/