I have managed to add a 3rd level menu item into Drupal, however I can only see that menu item when I am on the parent page for that item, if I am on another page and view source the code for that menu item does not exist.
I have looked through all of the settings and can not find anyway to change this, what can I do to fix it?
Thank you
Figured it out, if anyone is wondering you go into Structure > Menus > Main Navigation.
You then click edit on the parent item and check the box that says Show as expanded.
Related
I'm new to WP and looking to put a CTA to my main menu. Currently the ordinary items are left aligned, and the CTA would be right aligned. So far this is what I've thought:
Hardcode it into the theme with the link to the page. Easy but ugly and error prone + the editor/author can't edit the link.
Define a secondary menu and just get first item (wp_get_nav_menu_items?). Better but seems odd to use a menu just to get an element.
Any other idea? Is there the WP way of doing this?
You can add this item as last in your menu, then assign custom class to this item and add required styles (positioning, CTA styles).
I relly need help. I made a wordpress website, but i dont know how to disable top page from drom down menu.
I want to turn off page "Apartmani" because it is a empty page, so can you tell me how to disable that page and when you want to click on it nothing happens.
Here s the picture http://www.dodaj.rs/f/t/13H/495kOjY8/pitanje.png so i want to unable "Apartmans".
Thanks
The easiest way for you do do this is not to add this "Apartmani" as a Page in your menu, but as a simple link (as you can add custom links in your menu), with "#" as target. As is you will have a menu item that will handle its sub-pages, but this item will not lead to anything at all as long as the targeted link is #...
A website I'm working on has a lot of menu items, so they were split into two menus. There's a more button which shows the second menu using JS (only one is shown at a time).
What I want to achieve is that when a user clicks on an item in the second menu, the second menu is displayed by default after reloading.
For this, I need to know if the current page is in the secondary menu, but I don't know how to access the menu items. More specifically, I can't find out what the ID of my menu is (I guess I should use the wp_get_nav_menu_items which needs a menu ID).
WordPress adds the current_page_item class on the li in the nav of the current page you are on. So you can use that class to style the current page item.
I only want to show the pages that do not have parents, and link the other pages from their parent pages.
I want to have a simple main menu: Home | Pages | About | Contact
About 8 pages are linked from the Pages page. At the moment, the menu has 12 items, which deforms the layout pretty badly.
I have tried making the pages private, unpublished, and other options, but that doesn't seem to be the way to do it. Is there a way I can just have only parent pages linked in the main menu?
You can edit the menu (under the appearance tab in the dashboard). (you may need to add a new menu and assign it to the main navigation menu. It sounds like you have the defaulted menu set-up.
Once you've added a menu and assigned it to the main navigation, you can uncheck "automatically add top-level elements" or its equivalent, and add/remove menu items. You can also change their hierarchy (independent of actual page hierarchy).
It's all so easy these days. Just Go to appearance>menus>click the little triangle next to the listed page name>click remove> don't forget to save ... all done!
Maybe you didn't set up a custom menu yet. Set up a custom menu first with the desired pages / links. If it doesn't show on your site, check custom memus are enabled in your theme.. this will help you setting up a custom menu: http://www.wpbeginner.com/wp-themes/how-to-add-custom-navigation-menus-in-wordpress-3-0-themes/
I have in my drupal site the primary links displayer at the top.
I would like to have a block in my internal pages a block witch dsplay the clicked menu ant its child .
May someone help
Take a look at menu_get_active_trail() to retrieve the active menu item