Home › Forums › Pro Themes › Flat Commerce Pro › Menus and Sub Menus
- This topic has 14 replies, 2 voices, and was last updated 8 years ago by wensolutions.
-
AuthorPosts
-
November 15, 2016 at 9:21 am #23373erniepopeParticipant
I have a top level menu item with a number of sub-menu items. Each sub-menu item has a page associated with it. I don´t want the top level menu item to have a page associated with it. I cannot find how I can have a top level menu item but with no associated page.
This is giving me a number of issues I believe:
1. On a pc/mac, if you click on the top level menu item rather than on a sub menu item – the custom CCS that I have set up don´t get applied
2. on an iPAD after the first click on a sub-menu item it is impossible to go back and select another sub-menu item from the same menu item. It does work on a smart phone as the menus are handled differently because of the smaller display screen.
Regards
Ernie
November 15, 2016 at 12:14 pm #23390erniepopeParticipantHi
I´ve fixed item 1 in the above post as I found another CSS that I needed to change in the custom CSS.
Issue 2 is the major problem as menus not usable on iPad.
Ernie
November 15, 2016 at 11:42 pm #23407wensolutionsKeymasterHello @erniepope,
We have tested the theme locally and could not precisely recreate your issue on our side.
Please provide us your site URL so that we can inspect your website for the issues and provide you with a precise fix.
Best Regards !!
November 16, 2016 at 1:25 am #23410erniepopeParticipantHi Thanks for your reply.
the url is http://www.sarapopeart.com
If you have the iPad with the longest side at the top, try clicking on the “prints” menu item. The first time you get the sub-menu and you can the click on a sub-menu item. The next time you click on “prints” the sub-menu doesn´t appear and you get the (blank) page associated with “prints”.
However, if you turn the iPad around so that the longest side is on the left you get the same menu/sub-menu handling as a smartphone. This works OK.
As a fix is it possible to force display on tablets always to use the smartphone menu/submenu handling?
regards
ernie
November 16, 2016 at 1:35 am #23411erniepopeParticipantFurther to my email of a few minutes ago I´ve looked your web site, http://www.wensolutions.com on my iPad.
When I click on “Our Focus” I always get the sub-menu. How do you achieve this?
Regards
Ernie
November 16, 2016 at 6:29 am #23416wensolutionsKeymasterHello @erniepope,
To disable the parent menu item to link to your inner pages, please paste in the following Custom CSS in your Admin Dashboard > Appearance > Customize > Theme Options > Custom CSS Options :
@media (min-width: 768px) { ul#menu-top-menu > li.menu-item-has-children > a { pointer-events: none; } }
Hope this Helps,
Best Regards !!
November 16, 2016 at 11:44 am #23423erniepopeParticipantThanks
It sort of worked. On a PC it has the required effect of only ever displaying the sub-menu.
However, the situation is worse on the iPad. When I click on a menu item that has a sub menu nothing happens at all, no submenu is shown. Only those menu items that don´t have sub menus do anything.
I´ve leeft the Custom CSS in place so you can look yourself from an iPad.
Regards
ernie
November 16, 2016 at 12:17 pm #23430erniepopeParticipantHi
Further to my previous post, I´ve found the following on my iPad.
If I go to http://www.sarapopeart.com the only menu items that work are those without submenus.
If I go to http://www.sarapopeart.com/lips everything works correctly for the menu items with submenus, exactly how I want it. However, as soon as I click on a menu item without a submenu e.g. HOME, the submenus stop working again.
Regards
Ernie
November 16, 2016 at 11:25 pm #23469wensolutionsKeymasterHello,
To properly address your needs regarding the primary menu, you will need to make some customization through Child Theme approach in your website.
To learn about child theme creation see the link here : https://codex.wordpress.org/Child_Themes. You can also automate the process of child theme creation with the help of Child Theme Generator Plugin.
After you have successfully created and activated your child theme, go to your child theme’s functions.php file and paste in the following Code there :
<?php /** *Recommended way to include parent theme styles. *(Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme) */ add_action( 'wp_enqueue_scripts', 'flat_commerce_pro_child_style' ); function flat_commerce_pro_child_style() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style',get_stylesheet_directory_uri() . '/style.css',array('parent-style')); wp_enqueue_script( 'flat-commerce-child-custom-js', get_stylesheet_directory_uri() . '/flat-commerce-custom.js', true ); }
If you have used the plugin to create child theme, your functions.php will be automatically populated by the function, meaning you will only need to add following block inside the function :
wp_enqueue_script( 'flat-commerce-child-custom-js', get_stylesheet_directory_uri() . '/flat-commerce-custom.js', true );
You will then need to create “flat-commerce-custom.js” file in the child theme directory and paste in the following js code in the file :
jQuery(document).ready(function($) { var menu = $('ul#menu-primary > li'); menu.each( function( i ){ if( $( this ).hasClass( 'menu-item-has-children' ) ) { $( this ).children('a').attr( 'href', 'javascript:void(0)' ); } } ); });
This will help you resolve the issue and provide a stable fix to the issue.
As the process is lengthy and you do not feel confident on code handling, you would also choose to Hire a Customizer to do the task for you. To Hire a professional customizer for the task, please follow this link : http://themepalace.com/hire-a-customizer/
Hope this Helps,
Best Regards !!
November 24, 2016 at 2:48 am #24021erniepopeParticipantHi
I´ve tried this and it doesn´t fix the problem.
What I notice is that on the iPad in Landscape mode when I press on the menu item with a submenu, the submenu appears and then disappears very quickly on second and subsequent presses of the menu item.
Is it possible remove any timers on how long the submenu is displayed. I think this would fix the problem if the submenu doesn´t disappear so quickly.
November 24, 2016 at 11:25 pm #24120wensolutionsKeymasterHello,
We have inspected your website and the js application we have suggested in the earlier thread seems to have not been implemented in the website currently.
Please make sure that you have correctly followed all the steps as we have indicated in the theme.
Also, while we tested locally, no such issue regarding menu disappearing too quick was found.
Kindly,please verify if the code has been applied correctly in the theme and write back to us with the code being implemented so that we could better understand the issue and provide a possible fix.
Best Regards !!
November 25, 2016 at 2:39 am #24131erniepopeParticipantHi
Yes, neither the JS nor child theme are set up at the moment as I removed them when I found the fix didn´t work for me.
As a workaround I have put my own vertical menu on the pages that have submenus. This approach works quite well on the iPad in landscape mode.
Did you test on an iPad in landscape mode?
Regards
Ernie
November 25, 2016 at 5:36 am #24141wensolutionsKeymasterHello,
We did check for the issue in the iPad Landscape mode and the menu seemed to be working fine on our side with the code we have provided, and hence it is not a theme bug.
It is also possible that the issues may have been caused by plugins conflict in your website. Please check to see if it is plugin conflict in the site by disabling the plugins in your website one by one to find the cause of the issue.
If the above attempts does not resolve the issue, please consider Hiring a Customizer to look into the matter and find the fix regarding your custom customization request.
To hire a customizer please follow this link : http://themepalace.com/hire-a-customizer/
Best Regards !!
December 1, 2016 at 6:55 am #24719erniepopeParticipantI´ll just stick with my workarounds to fix the problem.
I find it difficult to comprehend that the theme requires extra javascript for the menus and submenus to work on an iPad in landscape mode.
December 1, 2016 at 10:49 pm #24788wensolutionsKeymasterHello @erniepope,
We apologize you had to go through all the trouble for the menu issue in iPad.
We suggested to use the javascript approach to help you with your requirement as a quick fix. We will certainly test and check for every aspect of the menu in iPad to see and verify if it is a theme issue.
Also, as product quality is our top priority, we will surely fix it with the future theme update if the issue is regarding the theme.
Hope you would understand,
Best Regards !!
-
AuthorPosts
- You must be logged in to reply to this topic.