Publish on WordPress

You can publish via the widget control panel or by shortcode.

Widget control panel

Go to AppearanceWidgets, drag the Nextend Accordion Menu widget and drop it into one of your Widget Area. Here you can add a Title (this title is not the title of the Accordion Menu, but your theme’s title), and you can choose from your previously created Accordion Menus. Finally press the Save button and enjoy your awesome menu!

Shortcode

f you click on Accordion Menus from the left menu, then you can see all of your previously created menu. In the second column you can see the shortcode of the actual Accordion Menu, just copy this code and paste it into your posts or pages.

Advanced shortcode usage

You can use WordPress’ do_shortcode function to put your menu into your theme's PHP code. For this one you will need PHP and HTML knowledge.

If you are not sure about yourself, always have a backup, and edit from your FTP, not from the Appearance → Edit, because you can make PHP errors there, big enough to make your whole website blank including your back-end.

Example code:

<?php echo do_shortcode('[accordionmenu id="unique4f28420" accordionmenu="1187"]');?>

WordPress offers a do_shortcode function, what you can use to put shortcodes into your theme's PHP files.

  • You will need to find the codepart, where you want to have your menu. You can find a documentation on how to do that with different browsers here. Also this video could help.
  • After you have got the code, use the do_shortcode function to put your menu there. You can also use some other WordPress functions to make your menu only show up on certain pages.
Show up everywhere:
<?php echo do_shortcode('[accordionmenu id="unique4f28420" accordionmenu="1187"]');
Only on the homepage:
<?php
  if(is_home() || is_front_page()){
      echo do_shortcode('[accordionmenu id="unique4f28420" accordionmenu="1187"]');
  }
?>
Only on that page which has 2 as its ID:
<?php
  if(get_the_ID()==2) {
      echo do_shortcode('[accordionmenu id="unique4f28420" accordionmenu="1187"]');
  }
?>
Only on that page which has "Menu Test Page" as title:
<?php
  if(get_the_title()=="Menu Test Page") {
      echo do_shortcode('[accordionmenu id="unique4f28420" accordionmenu="1187"]');
  }
?>
Mix them:
<?php
  if(is_home() || is_front_page() || get_the_ID()==2 || get_the_title()=="Menu Test Page") {
      echo do_shortcode('[accordionmenu id="unique4f28420" accordionmenu="1187"]');
  }
?>