Title: Menu Shortcode
Last modified: October 11, 2016

---

# Menu Shortcode

 *  [Squidpeg9](https://wordpress.org/support/users/squidpeg9/)
 * (@squidpeg9)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/menu-shortcode-2/)
 * I am using a shortcode I created to pull my main nav menu into an area on my 
   testimonials page. It seems to work, except it strips out all of the styling.
   How can I fix this?
 * Here is the page:
    [http://creatingpositivefutures.com/testimonials-new/](http://creatingpositivefutures.com/testimonials-new/)
 * Here is the code I am using:
 *     ```
       function print_menu_shortcode($atts, $content = null) {
           extract(shortcode_atts(array( 'name' => null, ), $atts));
           return wp_nav_menu( array( 'menu' => $name, 'echo' => false ) );
       }
       add_shortcode('menu', 'print_menu_shortcode');
       ```
   
 * Shortcode is: `[menu name="main"]`

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

 *  [hxh90](https://wordpress.org/support/users/hxh90/)
 * (@hxh90)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/menu-shortcode-2/#post-8274356)
 * Try adding `container_class` with `fusion-main-menu` on the shortcode.
 *     ```
       function print_menu_shortcode($atts, $content = null) {
           extract(shortcode_atts(array( 'name' => null, ), $atts));
           return wp_nav_menu( array( 'menu' => $name, 'echo' => false, 'container_class' => 'fusion-main-menu' ) );
       }
       add_shortcode('menu', 'print_menu_shortcode');
       ```
   
 * Cheers,
    Septian
    -  This reply was modified 9 years, 8 months ago by [hxh90](https://wordpress.org/support/users/hxh90/).
    -  This reply was modified 9 years, 8 months ago by [hxh90](https://wordpress.org/support/users/hxh90/).
 *  Thread Starter [Squidpeg9](https://wordpress.org/support/users/squidpeg9/)
 * (@squidpeg9)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/menu-shortcode-2/#post-8278049)
 * Thanks! Will try.
    -  This reply was modified 9 years, 8 months ago by [Squidpeg9](https://wordpress.org/support/users/squidpeg9/).
 *  Thread Starter [Squidpeg9](https://wordpress.org/support/users/squidpeg9/)
 * (@squidpeg9)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/menu-shortcode-2/#post-8278082)
 * Ok that almost did it – applied the inline and all, now just need to get rid 
   of the bullet points. I added ‘menu_class’ => ‘fusion-menu’ and ‘menu_id’ => ‘
   menu-main’, but neither seems to help. Any ideas?
 *  Thread Starter [Squidpeg9](https://wordpress.org/support/users/squidpeg9/)
 * (@squidpeg9)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/menu-shortcode-2/#post-8297576)
 * Does anyone else have any ideas on this?

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

The topic ‘Menu Shortcode’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [Squidpeg9](https://wordpress.org/support/users/squidpeg9/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/menu-shortcode-2/#post-8297576)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
