-
AuthorPosts
-
November 9, 2014 at 6:54 pm #348388
Hi,
ich habe für einen Kunden mit Enfold eine One-Page-Seite generiert: http://www.agenda-mensch.com
(Diese Seite entspricht nicht mehr dem ursprünglichen Design, da der Kunde selbst sehr viel umgestellt hat)Für den Strich unterhalb des aktiven Menüs habe ich statt dem Standard ein Bild eingefügt.
Nun habe ich folgendes Phänomen:
Im Firefox funktioniert die Anzeige der aktiven Menüs ohne Probleme. Als generierten HTML-Code erhalte ich für den aktiven Menüpunkte folgendes:
<li id=”menu-item-29″ class=”menu-item menu-item-type-custom menu-item-object-custom current_page_item menu-item-home menu-item-top-level menu-item-top-level-3 current-menu-item”>Im Chrome stattdessen den Code:
<li id=”menu-item-29″ class=”menu-item menu-item-type-custom menu-item-object-custom current_page_item menu-item-home menu-item-top-level menu-item-top-level-3″>Hat wer eine Idee, warum dies hier anders ist und der aktive Menü in Chrome bzw IE nicht die Klasse current-menu-item erhält?
Auf der Demo-Seite von kriesi.at funktioniert die One-Page-Seite auch in Chrome anstandslos. (Habe nichts anderes erwartet :-) )
Thanks,
DanielaNovember 10, 2014 at 1:36 am #348591Hi Daniela!
Thank you for using Enfold.
Please try the following fix provided here: https://kriesi.at/support/topic/anchor-link-causing-navigation-bar-to-highlight-the-wrong-link/#post-268841
If possible, please disable any cache or minifying plugins before testing the solution.
Cheers!
IsmaelNovember 11, 2014 at 8:02 am #349226Hi Ismael,
Thanks for the fast solution.
I changed the css and the code in avia.js.
I deleted the cache and disabled the performance-plugin wp-rocket.It fixed the problem now in Google Chrome, but only for the logged-in-status.
If I log out, it will not function anymore, even not in firefox.In firefox it works in the logged-out-status before changing the code. Now it only works in the logged-in-status.
In IE it doesn’t work in the logged-in-status, nor in the logged-out-status.On the Ipad both items are marked – the previous and the actual one.
Cheers!
DanielaNovember 12, 2014 at 5:10 am #349853Hi Daniela,
Can you please create us a WordPress administrator account? post it here as a private reply.
Regards,
JosueNovember 12, 2014 at 1:39 pm #349992This reply has been marked as private.November 12, 2014 at 6:30 pm #350207Hi Daniela!
What’s the username to log-in?
Best regards,
JosueNovember 13, 2014 at 12:52 am #350513This reply has been marked as private.November 14, 2014 at 5:28 am #351128November 14, 2014 at 12:03 pm #351199This reply has been marked as private.November 15, 2014 at 6:20 am #351694Hi!
Did you remove the modifications on avia.js file? It’s not working even when I’m logged in. I noticed that you placed the helper-main-menu.php file on the child theme folder. What are the modifications that you added there?
Cheers!
IsmaelNovember 15, 2014 at 3:04 pm #351812Hi Ismael,
i see, it no longer works. I don’t know why.
I changed the avia.js in the enfold-folder and i put a copy from it to the enfold-child-theme. There I generated a “js”folder and put the file in it.Helper-main-menu.php: I put the following code after do_action(‘ava_inside_main_menu’); echo ‘</nav>’; in it:
echo “<div class=’add_text’></div>”;
Thanks,
DanielaNovember 17, 2014 at 1:11 pm #352371Hi!
You have to dequeue or unregister the default avia.js file first. Did you add this code on functions.php? If not, please add it to enable the theme to recognize the avia.js file on the child theme.
if(!is_admin()) add_action('wp_enqueue_scripts', 'avia_register_child_frontend_scripts', 100); function avia_register_child_frontend_scripts() { $child_theme_url = get_stylesheet_directory_uri(); wp_dequeue_script('avia-default'); //register js wp_register_script( 'avia-default-child', $child_theme_url.'/js/avia.js', array('jquery'), 1, true); wp_enqueue_script( 'avia-default-child' ); }
Best regards,
IsmaelNovember 17, 2014 at 4:30 pm #352502Hi Ismael,
No I did’nt dequeue or enque. Thank you very much for your hint and for the code. I put the code above into the function.php of the child-theme. My customer changed the navigation, so that not all menu-items link to a section of the page. The first two link to pages.
Menu-item, which are pages get marked, menu-item, which are sections don’t get marked.Best regards,
DanielaNovember 18, 2014 at 2:23 pm #352959Hi!
I checked the site and current menu item marker is working for pages and section links. Please remove browser cache then reload the page a few times.
Best regards,
IsmaelNovember 18, 2014 at 8:23 pm #353220Hi Ismael,
due to problems with drag and drop in wordpress relating to theme enfold, I undid the changes in avia.js. I think there was a plugin-problem.
I don’t know, why it now works. :)thank you very much for your support.
I hope the problem is solved.Daniela
-
AuthorPosts
- The topic ‘One-Page-Site: Anzeige aktiver Menüpunkt funktioniert nicht in Chrome bzw. IE’ is closed to new replies.