Deprecated: Required parameter $location follows optional parameter $post_types in /home1/mybravet/public_html/wp-content/plugins/monarch/monarch.php on line 3783

Warning: Cannot modify header information - headers already sent by (output started at /home1/mybravet/public_html/wp-content/plugins/monarch/monarch.php:3783) in /home1/mybravet/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home1/mybravet/public_html/wp-content/plugins/monarch/monarch.php:3783) in /home1/mybravet/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home1/mybravet/public_html/wp-content/plugins/monarch/monarch.php:3783) in /home1/mybravet/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home1/mybravet/public_html/wp-content/plugins/monarch/monarch.php:3783) in /home1/mybravet/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home1/mybravet/public_html/wp-content/plugins/monarch/monarch.php:3783) in /home1/mybravet/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home1/mybravet/public_html/wp-content/plugins/monarch/monarch.php:3783) in /home1/mybravet/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home1/mybravet/public_html/wp-content/plugins/monarch/monarch.php:3783) in /home1/mybravet/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home1/mybravet/public_html/wp-content/plugins/monarch/monarch.php:3783) in /home1/mybravet/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1758
{"id":6471,"date":"2012-10-12T07:54:30","date_gmt":"2012-10-11T23:54:30","guid":{"rendered":"http:\/\/www.mybravetruehero.com\/?p=6471"},"modified":"2013-06-18T10:58:46","modified_gmt":"2013-06-18T02:58:46","slug":"how-to-add-custom-menu-support-in-your-wordpress-theme","status":"publish","type":"post","link":"https:\/\/www.mybravetruehero.com\/how-to-add-custom-menu-support-in-your-wordpress-theme\/","title":{"rendered":"How To Add Custom Menu Support in Your WordPress Theme"},"content":{"rendered":"

\"How<\/a><\/p>\n

Ever wanted to use the drag and drop feature in WordPress? But the problem is that your theme doesn’t support custom menu. Here is what you need to do<\/p>\n

1. First you need to locate or go to your theme’s folder and add this code before the closing “?>”\u00a0<\/strong>in your functions.php<\/strong><\/p>\n

If you see in the code we are trying to register two places the header and the footer menu<\/p>\n

\/* Register Menus*\/\r\nfunction register_my_menus() {\r\nregister_nav_menus(\r\narray('header-menu'=> __('Header Menu'), 'footer-menu'=> __('Footer Menu'))\r\n);\r\n}\r\nadd_action('init','register_my_menus' );<\/pre>\n

And when that is done hit save and we are half way done<\/p>\n

2. Now the next part is that we are going to locate where we want the navigation to be placed. Go to your theme’s folder again and add this code in your header.php<\/strong> file<\/p>\n

<?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'container_class' => 'header-menu-class', 'menu' => 'header-menu') ); ?><\/pre>\n

Important:<\/p>\n

1. ‘menu’ => ‘header-menu’<\/strong> code is what we place if you want to target the header but if you want the footer you can just set it like this\u00a0‘menu’ => ‘footer-menu’<\/strong><\/p>\n

2. ‘container class’ => ‘header-menu-class’<\/strong> this is for the style for the menu so this one ‘header-menu-class’ is like a class in your CSS file which will look like this #header-menu-class<\/strong><\/p>\n

If everything is good save it and that is it your theme now supports custom menu in WordPress so you can now start organizing your menus with ease by dragging and dropping the pages or categories.<\/p>\n

The codes that I used were not mine but found that it’s a very good example so I would like to\u00a0acknowledge\u00a0the author Alastair McDermott and you can visit him at\u00a0http:\/\/www.websitedoctor.com\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

Ever wanted to use the drag and drop feature in WordPress? But the problem is that your theme doesn’t support custom menu. Here is what you need to do 1. First you need to locate or go to your theme’s folder and add this code before the closing “?>”\u00a0in your functions.php If you see in […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_mi_skip_tracking":false,"spay_email":"","_links_to":"","_links_to_target":""},"categories":[1773],"tags":[1734,1707,1736,1737,1735],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2BD1N-1Gn","_links":{"self":[{"href":"https:\/\/www.mybravetruehero.com\/wp-json\/wp\/v2\/posts\/6471"}],"collection":[{"href":"https:\/\/www.mybravetruehero.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mybravetruehero.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mybravetruehero.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mybravetruehero.com\/wp-json\/wp\/v2\/comments?post=6471"}],"version-history":[{"count":0,"href":"https:\/\/www.mybravetruehero.com\/wp-json\/wp\/v2\/posts\/6471\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.mybravetruehero.com\/wp-json\/wp\/v2\/media?parent=6471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mybravetruehero.com\/wp-json\/wp\/v2\/categories?post=6471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mybravetruehero.com\/wp-json\/wp\/v2\/tags?post=6471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}