I have several menus for different sections in my website
Home › Forums › Pro Support › I have several menus for different sections in my website
- This topic has 10 replies, 2 voices, and was last updated 5 years, 11 months ago by Ohad Stone.
-
AuthorPosts
-
May 31, 2018 at 6:59 am #68209Ohad StoneParticipant
I have several menus in my website.
Different sections of the site (the promotional section, a section for members, a section for employees) have different menus. But Responsive Menu forces me to pick one menu for all the pages in my website. Can’t I have it display the proper menu for each sectionpage?May 31, 2018 at 9:13 am #68218Peter FeatherstoneParticipantHey Ohad,
There are quite a few answers to that in this forum already I believe and the bottom of this knowledgebase article explains how to do that:
https://responsive.menu/knowledgebase/using-the-shortcode/
Hope that helps
Peter
June 1, 2018 at 11:35 am #68217Ohad StoneParticipantI couldn’t find an answer in the forum.
Plus, the following issues are is not clear:1. Once I turn on the Shortcode option, the Menu is turned off for the entire site. Now I have to add it manually in each page that I want the menu to appear at?
2. In the link provided there’s a table. You state that with the shortcode turned on “you get a few extra options for changing particular information on the fly”. Where are those options?
3. “A small table of these is shown below” – The syntax of the shortcode, using those options, is not clear. Please clarify.June 1, 2018 at 12:57 pm #68216Peter FeatherstoneParticipantHey Ohad,
1. Yes, you need to put the shortcode on every page, normally you would just do it in one of the template files such as header.php.
2. The options are shown in the table to use and there are examples of using them in the same page.
3. There is a heading in that page titled Using Custom Options that shows exactly that?
Please advise
Peter
June 2, 2018 at 10:07 am #68215Ohad StoneParticipantThanks Peter.
Well, all the examples in the page (under the table) show as php code, and I’m not a developer, therefore I disregarded them. But I understand now that the shortcode syntax is the same, whether it is embedded in php code or not.
1. How can I tell what other options the shortcode offers? As you state – “a small table of these is shown below”, it implies that there are more options that are not displayed in the table.
2. Another question: Let’s say that most of my website pages require menu #1, while only several require menu #2. Can I add the shortcode in the header.php file with menu #1 (that will count for all the pages in the website), and only for those pages that require menu #2 – add the shortcode calling for menu #2 in the body of those pages itself? Will menu #2 override menu #1 in those pages?
June 2, 2018 at 10:32 am #68214Peter FeatherstoneParticipantHey Ohad,
I see what you mean but yeah the example could be using PHP or not, the shortcode is still used in the same way as you say.
1. If you want a full list, you can look in the
default_options.php
file in theconfig
folder of my plugin. Not all options will work with the shortcode however but it’s worth playing around with a few.2. No, that is not possible. You would end up with double output in your page and it wouldn’t work. How are you determining what pages it should show menu 1 and menu 2 on. As long as there is a specific rule then you can create a simple if statement in PHP based on this as on the knowledgebase article.
Hope that helps
Peter
June 2, 2018 at 11:35 am #68213Ohad StoneParticipantThanks.
2. Well, I’m not sure I can differentiate between those pages needing menu #2 from the rest (having menu #1) based on a rule. Can I use page ID numbers in the php IF statement?
Maybe something like the following algorithm:
if page-id is:
‘1549’ ==> use ‘menu-#1’;
‘1554’ ==> use ‘menu-#1’;
‘1652’ ==> use ‘menu-#2’;etc…
June 2, 2018 at 5:02 pm #68212Peter FeatherstoneParticipantHi Ohad,
Yes you can do that. That is the example provided on this page:
https://responsive.menu/knowledgebase/hiding-the-menu-specific-pages/
All the best
Peter
June 4, 2018 at 11:05 am #68211Ohad StoneParticipantThanks.
June 4, 2018 at 4:07 pm #68210Peter FeatherstoneParticipantHey Ohad,
You are welcome 🙂
Peter
-
AuthorPosts
- The topic ‘I have several menus for different sections in my website’ is closed to new replies.