I was able to make it work by adding these two lines to my theme’s functions.php
file:
add_filter( 'widget_text', 'shortcode_unautop');
add_filter( 'widget_text', 'do_shortcode');
The Custom HTML Widget now correctly executes the shortcode function and outputs the result.
Related Posts:
- How to pass JavaScript variable to PHP in wordpress widget?
- WordPress widget / plugin….fields not appearing in my widget
- How to trigger $_GET request within admin plugin page?
- How can I get WordPress to save comments in markdown format?
- How to translate to spanish wordpress hardcoded content/files?
- Can’t access 3rd party API, code works on local server but not on wordpress
- Form tries to download a file on submit
- Adding link on title its in description but not in title see screenshots attached
- What can I do to customize a widget provided with this plugin? from where have I to start?
- How to create a “Most Popular” & “Latest” TAB in WordPress
- dealing with large HTML output via plugin code
- Problems with autoloading classes via sp_autoload_register / maybe interfering WP-specific autoloader
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- category_name not working (not showing up in sql query debug)
- Output in XHTML or HTML 5 for plugins?
- How to Loop Plugin Option Field Set?
- How do I add a widget programmatically to a newly created site (WPMU) within a plugin?
- Editor not displaying dynamically after clicking on the button
- Rename existing old uploaded images containing accented French characters (not during upload)
- How to Create a Directory in a Plugin Folder?
- Create plugin that works in background
- Checking for user role in a custom plugin
- HELP: Integrating WP with raw PHP code once published button is hit
- Loading class files via autoload method
- I would like to use create a function in my custom plugin to tell WP to use a different header
- Getting media library popup in custom plugin admin page
- jQuery function didn’t work in my plugin
- Sanitizing, Validating and Escaping in WordPress (Plugin)
- Escape when echoed
- Plugin Development sqlite or WordPress’ database
- WooCommerce get_price returning wrong price when used via ajax
- Open Post Thumbnail in New Child Theme File in WordPress
- Redirecting to home page after login as custom role WordPress
- Add keywords meta to index.php page
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- WooCommerce: Building a page with user input which is used to query order status and external API and return a result
- What are the specifics of WordPress development I need to know? [closed]
- How can i get the post’s full html source by its ID?
- How to create a custom post type that contains another custom post type?
- Redirect to another page using contact form 7? [closed]
- Activate my plugins via FTP
- How to add apply_filter for a class property in plugin
- Issue running db create table query from static method
- How to make multiple admin pages for one plugin?
- A server-side hook failed when committing plugin code to SVN
- Content-Security-Policy Headers are there and showing the correct settings, but still getting a refused connection
- strange shortcode error: does shortcodes requires any dependency?
- All custom widgets are not showing in widget area at the same time
- How to delete all categories programatically?
- How to use custom Javascript code inside a plugin?
- How to add/change (woocommerce) product tab icon
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- I want to generate the pdf and save it in library?
- Using meta_query in a WP_Query not working for numbers properly
- File Uploader – Upload without adding to Media Library
- Wierd site output [closed]
- How to write to a separate PHP file in plugin settings
- How to set the default value as the saved value once a form of widget is saved?
- Create “new pages” within the admin section of plugin
- More gentle way to hook WordPress custom url
- How to display results from a data table with an encrypted user id?
- How to add captcha to publish widget
- Code for unique user visit count on every page WordPress
- How to Call Specific .PHP file on add_submenu_page selection in Plugin Development?
- How to Add text value in Automatically in this conditions?
- Checkbox show / hide output result
- Widgets are not displaying in the admin panel
- admin_notices show after load completed
- How can we get this dynamically as this folder may not be by the same name always → wp-admin
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- Hide content for specific users with id
- adding dynamic/multiple slug values in ‘option_none_value’
- Why is my shortcode not working?
- The styles in the recent posts widgets plugin not working
- How to change a wordress plugin php code in my child’s functions.php file?
- Getting Fatal error: Uncaught Error: Call to undefined function plugin_dir_path() when linking to another file within my wordpress plugin
- How can I see $post object in frontend from functions.php?
- Move plugin pages from dashboard to front-end
- implement checkbox or toggle switch in plugin code
- 500 Internal server error wp_handle_upload_prefilter
- Create a form and have custom menu display based on user answers?
- Get post content inside plugin class method
- Problem with conditional woocommerce custom checkout field
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- How can I insert a record into a custom table from my custom form in my custom admin page?
- Saving plugin data returns “You do not have sufficient permissions to access this page.”
- How to add a handler for a button in plugin?
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- conditional tags for the output of a plugin
- Load my plugin before cache
- How to fix ‘Call to undefined function do_settings()’ error?
- wordpress select multiple options and illegal string offset ‘timeslot’ [closed]
- how to search through plugin in wordpress cimy-user-extra-fields?
- wordpress illegal string offset ‘parameter’ error
- Function not being called on form submit, only blank admin-post.php page
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Limit entry to a WordPress page
- WordPress Throwing Deprecated Errors on its own Files
- plugin doesn’t retrieve data from database