Title: Custom HTML Widget &#8211; Use shortcodes
Last modified: April 4, 2019

---

# Custom HTML Widget – Use shortcodes

 *  Resolved [pelicanpaul](https://wordpress.org/support/users/pelicanpaul/)
 * (@pelicanpaul)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/custom-html-widget-use-shortcodes/)
 * Hi,
 * I have one instance of a website where I have a mega menu. In that mega menu 
   I have implemented a custom shortcode.
 * [sf_categories parent=”2225″ columns=”4″]
 * On a MediaTemple server running php 5.xxx it works fine. When migrated to WP-
   Engine the shortcode does not fire. and instead of the result it does not call
   the shortcode. Is this some setting?
 * The shortcode in my functions.php file is
 *  function sf_categories($atts){
 *  $a = shortcode_atts( array(
    ‘parent’ => 0, ‘menu_class’ => ‘menu parent-menu’,‘
   columns’ => 1
 *  ), $atts );
 *  gc_woo_cats($a[‘parent’],$a[‘menu_class’],$a[‘columns’]);
 *  }
 *  add_shortcode( ‘sf_categories’, ‘sf_categories’ );
 * Go to: [https://savoirfaire1.wpengine.com/](https://savoirfaire1.wpengine.com/)
   and click on Surfaces…
 * thanks,
 * Paul
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-html-widget-use-shortcodes%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [pelicanpaul](https://wordpress.org/support/users/pelicanpaul/)
 * (@pelicanpaul)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/custom-html-widget-use-shortcodes/#post-11393316)
 * Figured it out. I had to add
 * add_filter( ‘widget_text’, ‘shortcode_unautop’);
    add_filter( ‘widget_text’, ‘
   do_shortcode’);
 * to my functions file
 *  Plugin Author [megamenu](https://wordpress.org/support/users/megamenu/)
 * (@megamenu)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/custom-html-widget-use-shortcodes/#post-11395085)
 * Hi Paul,
 * Good to hear you got it fixed.
 * I like what you have done with the sub menu. As a side note/observation, you 
   could add the Painting, Brushes etc items as actual menu items (children of Product
   Categories) rather than outputting them as widgets. Those sub menu items will
   show up in the mega menu builder so you can arrange them into 2 rows/4 columns
   as you have the widgets. Either way it is a nice effect with the transparent 
   background!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom HTML Widget – Use shortcodes’ is closed to new replies.

 * ![](https://ps.w.org/megamenu/assets/icon-128x128.png?rev=1489843)
 * [Max Mega Menu](https://wordpress.org/plugins/megamenu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/megamenu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/megamenu/)
 * [Active Topics](https://wordpress.org/support/plugin/megamenu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/megamenu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/megamenu/reviews/)

## Tags

 * [custom html](https://wordpress.org/support/topic-tag/custom-html/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 2 replies
 * 2 participants
 * Last reply from: [megamenu](https://wordpress.org/support/users/megamenu/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/custom-html-widget-use-shortcodes/#post-11395085)
 * Status: resolved