Title: Shortcode header tag
Last modified: August 21, 2016

---

# Shortcode header tag

 *  Resolved [d.grechishkin](https://wordpress.org/support/users/dgrechishkin/)
 * (@dgrechishkin)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/shortcode-header-tag/)
 * Hello, theank you for niece plugin. I`m trying shortcode [custom_menu_wizard 
   menu=”menu_name” children_of=”menu_item” depth=1 title_from=current] it works
   fine, but header becomes <h2> and i need <h4>. How can i change it? Thank you.
 * [https://wordpress.org/plugins/custom-menu-wizard/](https://wordpress.org/plugins/custom-menu-wizard/)

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

 *  Plugin Author [wizzud](https://wordpress.org/support/users/wizzud/)
 * (@wizzud)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/shortcode-header-tag/#post-4753035)
 * There is (currently) no shortcode option available for changing the HTML element
   that wraps the title of a widget produced via a shortcode. The default is an 
   H2, with a class of “widgettitle”, and that default is the WordPress default (
   see **before_title** & **after_title** args in documentation for [the_widget()](http://codex.wordpress.org/Function_Reference/the_widget)).
 * There is, however, a filter available if you can add something along these lines
   into your theme’s functions.php :
 *     ```
       function my_cmw_shortcode_filter( $sidebar_args ){
           // before_title default is '<h2 class="widgettitle">' : change to ...
           $sidebar_args[ 'before_title' ] is '<h4 class="widgettitle">';
           // corresponding after_title default = '</h2>' : change to ...
           $sidebar_args[ 'after_title' ] = '</h4>';
           // NB : other sidebar_args are before_widget and after_widget
           return $sidebar_args;
       }
       add_filter( 'custom_menu_wizard_shortcode_widget_args', 'my_cmw_shortcode_filter', 10, 1 );
       ```
   
 * If your H4 doesn’t need a class then remove it, or modify it to whatever you 
   want it to be.
 * [ If you don’t already use a child theme then I would suggest that you consider
   doing so, otherwise any upgrade to your theme will lose any modifications you
   make to its functions.php! ]
 *  Thread Starter [d.grechishkin](https://wordpress.org/support/users/dgrechishkin/)
 * (@dgrechishkin)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/shortcode-header-tag/#post-4753037)
 * Thanks a lot

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

The topic ‘Shortcode header tag’ is closed to new replies.

 * ![](https://ps.w.org/custom-menu-wizard/assets/icon-256x256.png?rev=1381901)
 * [Custom Menu Wizard Widget](https://wordpress.org/plugins/custom-menu-wizard/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-menu-wizard/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-menu-wizard/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-menu-wizard/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-menu-wizard/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-menu-wizard/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [d.grechishkin](https://wordpress.org/support/users/dgrechishkin/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/shortcode-header-tag/#post-4753037)
 * Status: resolved