-2

I am absolutely new to wordpress & woocommerce
my question is how to use/call menu in CMS page eg- I created a menu my-menu & I want this menu in my CMS page

can anyone help with how to call menu in CMS page

0

2 Answers 2

1

Try below code ( with proper modifications if needed ) in your 'header.php'

<?php
       if (has_nav_menu('primary_navigation')) :
          wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav']);
       endif;
    ?>

For more details try this link

3
  • I need to call menu in CMS page , not in template/php files
    – Dinesh
    Sep 5, 2016 at 13:20
  • What you mean by "CMS page"? Sep 5, 2016 at 13:42
  • any page we create with dashboard
    – Dinesh
    Sep 5, 2016 at 16:00
1

This is not very usual and should be done through templating, but to answer your question:

  1. Create the menu you want in your page and put it into a widget.
  2. Use any widget shortcode plugin (as example: "amr shortcode any widget") to insert the shortcode for that widget to insert it in your page.

Please view the documentation of the plugin of your choice for further information on how to use the shortcode.

Inserting a menu into a single pages content is not really common, so there is no "out of the box" way to do it without templating or using a plugin.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.