Title: [Plugin: JQuery Mega Menu Widget] how to add custom php shortcode to header.php
Last modified: August 20, 2016

---

# [Plugin: JQuery Mega Menu Widget] how to add custom php shortcode to header.php

 *  Resolved [Ramzii](https://wordpress.org/support/users/ramzii/)
 * (@ramzii)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-jquery-mega-menu-widget-how-to-add-custom-php-shortcode-to-headerphp/)
 * I tried this, no luck:
 * `<?php echo do_shortcode('[dcwp-jquery-mega-menu menu="test"]'); ?>`
 * Any suggestions?
 * [http://wordpress.org/extend/plugins/jquery-mega-menu/](http://wordpress.org/extend/plugins/jquery-mega-menu/)

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

 *  Thread Starter [Ramzii](https://wordpress.org/support/users/ramzii/)
 * (@ramzii)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-jquery-mega-menu-widget-how-to-add-custom-php-shortcode-to-headerphp/#post-2519296)
 * Its not possible, contacted the creator.
 * Best way to achieve this is by creating a custom widget area in (in my case) 
   the header area.
 * And placing the mega-menu widget inside that area.
    Quite easy.
 *  [3×7](https://wordpress.org/support/users/3x7/)
 * (@3x7)
 * [14 years ago](https://wordpress.org/support/topic/plugin-jquery-mega-menu-widget-how-to-add-custom-php-shortcode-to-headerphp/#post-2519408)
 * Hi,
 * Can you please share how you managed to do this.
 * Cheers!
 *  Thread Starter [Ramzii](https://wordpress.org/support/users/ramzii/)
 * (@ramzii)
 * [14 years ago](https://wordpress.org/support/topic/plugin-jquery-mega-menu-widget-how-to-add-custom-php-shortcode-to-headerphp/#post-2519409)
 * Sure, try this on for size:
 * [http://wordpress.org/support/topic/how-to-create-new-widget-area?replies=5](http://wordpress.org/support/topic/how-to-create-new-widget-area?replies=5)
 * After that, you need to use the php shortcode for wordpress, something like this:
 *     ```
       <?php /* Widgetized sidebar */
       if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Navigatie MEGAMENU') ) : ?>
       <?php endif; ?>
       ```
   
 *  [3×7](https://wordpress.org/support/users/3x7/)
 * (@3x7)
 * [14 years ago](https://wordpress.org/support/topic/plugin-jquery-mega-menu-widget-how-to-add-custom-php-shortcode-to-headerphp/#post-2519410)
 * thanks,
 * I also found a plugin which does the most of the job.
    [http://wordpress.org/extend/plugins/custom-widget-area/](http://wordpress.org/extend/plugins/custom-widget-area/)
 * then you just put the if code where you want…
 * Did you try to make it static?
    I mean that when I scroll down I would like to
   have this widget area/menu all the time on top of the page… I’ve seen this on
   several sites…
 * Cheers,
    Mike
 *  Thread Starter [Ramzii](https://wordpress.org/support/users/ramzii/)
 * (@ramzii)
 * [14 years ago](https://wordpress.org/support/topic/plugin-jquery-mega-menu-widget-how-to-add-custom-php-shortcode-to-headerphp/#post-2519411)
 * Not a problem, glad it worked out for you.
 * No didnt try that, I know what you mean though.
    Css -> position:fixed
 * It has some cool jquery possibilities, never tried them with wordpress though.
 *  [3×7](https://wordpress.org/support/users/3x7/)
 * (@3x7)
 * [14 years ago](https://wordpress.org/support/topic/plugin-jquery-mega-menu-widget-how-to-add-custom-php-shortcode-to-headerphp/#post-2519412)
 * Will check out..
 * thanks again!

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

The topic ‘[Plugin: JQuery Mega Menu Widget] how to add custom php shortcode to 
header.php’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/jquery-mega-menu_e7e7e7.svg)
 * [JQuery Mega Menu Widget](https://wordpress.org/plugins/jquery-mega-menu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jquery-mega-menu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jquery-mega-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/jquery-mega-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jquery-mega-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jquery-mega-menu/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [3×7](https://wordpress.org/support/users/3x7/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/plugin-jquery-mega-menu-widget-how-to-add-custom-php-shortcode-to-headerphp/#post-2519412)
 * Status: resolved