Correct menu structure with clickable top menu for Sparkling theme

Hi everyone,

I am sure this is a basic question, but I am struggling about having a correct menu structure.
Basically, I have the following menu structure

  • Activity → Top level main menu - which is a page
    – Sub Activity 1 → which is a page
    – Sub Activity 2 → which is a page

So I have 2 questions

  1. when I go on the page sub activity 1 or 2, the main menu item “Activity” is not colored to show that I am in this menu, what structure should I use to have the main menu item colored?

  2. How do I make the top level item “Activity” a clickable link to access its content? Currently, I can only rollover to see the 2 other submenus.

Thank you very much for your insights
David

Hi David,

I hope you are well today and thank you for your question.

1) when I go on the page sub activity 1 or 2, the main menu item “Activity” is not colored to show that I am in this menu, what structure should I use to have the main menu item colored?
You can color it by adding the following CSS code in the Custom CSS option of your theme on the below path.

Admin Area -> Apperance -> Theme Options -> Other -> Custom CSS

.navbar-default .navbar-nav .current-menu-ancestor a.dropdown-toggle{
    color: #DA4453;
    background-color: transparent;
}
2) How do I make the top level item “Activity” a clickable link to access its content? Currently, I can only rollover to see the 2 other submenus.

You can make it clickable by using the attached small plugin specially developed for you.

Best Regards,
Movin

Movin,

Everything works like a charm :slight_smile:
Thank sooo much for your help and time you took to develop this! :slight_smile:

Have a great day

David

I am glad that i could help you :slight_smile:

You are always welcome here :slight_smile:

Movin, I get this error running 4.3
Fatal error: Cannot redeclare custom_nav_menu_link_attributes() (previously declared in /home/asyoulik/public_html/wp-content/themes/sparkling-child/functions.php:19) in /home/asyoulik/public_html/wp-content/plugins/colorlib-plugin.php_3/colorlib-plugin.php on line 16

I even added the lines to the child functions.php file, still nothing.
My top level menu items are simply pages, and they are not clickable still. As of right now, even though the menu items are set to be a page, they are still linking to …nothing (#)!

Any ideas how to fix this?
Thanks! -Brad

Hi Brad,

You got this error message because the function declared in the attached colorlib plugin is also you have declared in the sparkling child theme functions.php file so to resolve the issue try temporary deleting the function from the functions.php file of your child theme.

I visited your site http://asyoulikeitllc.com/ to test it and found it’s working fine as shown in the attached screenshot.

Is it working fine now on your site?

Best Regards,
Movin

So… wait {scratches head}… When you went to the site and clicked on the “Bathrooms” menu item, it actually opened the page of /bathrooms?

It’s still not working for me at all.

Here’s a video cast of the problem still existing:
http://screencast-o-matic.com/watch/cojTDqfkld

Actually… Want to see something even crazier? When I activate the parent them, the menu items revert back to #. Watch the bottom of this new screencast as I switch back and forth from parent to child themes http://screencast-o-matic.com/watch/cojTDafkI6
When I activate the child themes, they go back to being menu items that still are not clickable.

I just reinstalled WordPress 4.3 and it didn’t change anything.

This time I backed out the 1.9.4 from git, and instead went with the 1.9.3 version.

Still no change to the top level menu items.
All plugins disabled, and even backed out all custom functions.php options as well.

Movin, I just wanted to make sure I sent a screenshot (as well as all the above) that would go ahead and verify that the plugin AND the code in the child functions.php file are (indeed) NOT going at the same time, and the top level menus are still not clickable.

Any ideas?

ftp:

asyoulik
8ae81a14

http://asyoulikeitllc.com/wp-login.php
AsYouLikeIt
[email protected]

Hi David,

Thank you for sharing the site details.

I tested on your site and confirmed the issue that the anchor link for parent menu is getting displayed as i have described previously but on clicking on it nothing happens.

To make the parent menu link work on clicking on it i have added some extra code in your site in the plugin that i have provided previously and now i have confirmed that it’s working fine on your site.

Could you please check it and let me know how it works for you now?

Also for the reference i have attached the new updated plugin to this reply.

Best Regards,
Movin

Holy Crappers Movin: <friggin’ huge>THANK YOU!!!</friggin’ huge>
honestly it seems like that js tweak ought to be built in as default, then if an end-user wants to give it a placeholder of ‘#’ they can do that.

Regardless…

Again: THANK YOU!!!

EDIT Why’s this still not working on mobile?

Howdy Movin. Hope your day’s going good. Any update on why the menu’s still are not working on mobile devices? ON clicking the parent menu, the sub menus should open. Yet for whatever reason, the sub menus are not opening when the main menu item is tapped on mobile devices.

Your thoughts on how to fix this theme’s navigation on mobile devices is greatly appreciated.

Hi Brad,

We are using the following WordPress wp_is_mobile function to determine whether the site is accessed using the mobile or desktop so it should work.

Are you testing it on real mobile device or using any simulator?

Which mobile device are you using to test it?

Please also try using the attached updated plugin.

Regards,
Movin

Hey guys,

Ive got the same issue with Parent page links in the menu not working on www.airlokinsultaion.co.uk - have you managed to resolve this yet?

George

Movin, that new code (plugin 14) that you attached… That’s (basically) the exact same code that was in there before, right?

Are you testing it on real mobile device or using any simulator?

I’m looking at the site on both my Samsung Galaxy running Chrome on Android, and the wife’s sitting next to me here with her iPhone as well. Neither of them are working. The menu items are still neither opening, nor are they even going to the correct page.

Hi George,

The parent menu acts as placeholder and is not clickable is the default functionality of the theme and not the bug.

You can change this default functionality to make parent menu clickable by using the shared small plugin attached to the following reply.

https://colorlibsupport.com/t/correct-menu-structure/page/2/#post-28178

Best Regards,
Movin

Hi Brad,

http://prntscr.com/8azqc2 Movin, that new code (plugin 14) that you attached…. That’s (basically) the exact same code that was in there before, right?

It’s not the same code.

Can you notice the two differences in the code as ponied by the arrows in the attached screenshot?

So please try using the latest shared plugin and test it on your site after clearing browser cache.

Regards,
Movin