• Ok, check out the html on these two menus. I think I might know the prob, but I still need to know how to fix it! Take a look at the two pages and look at the main menu.

    https://joshstevensfoundation.org/category/events/upcoming
    https://joshstevensfoundation.org/team-players/

    On the first one notice how the div structure is completely different than on the second page. It’s only doing it on these pages using the events calendar plugin. This doesn’t happen on all the other sites that I have this plugin installed. And BOTH templates are linking to the SAME header where the code is for the main menu bar.

    Anyone know what the dealyo is?

Viewing 7 replies - 1 through 7 (of 7 total)
  • This is the a very simple problem.Its just because the div has a different name and the css you have defined for the actual div class selector is not working on it.The original code is:
    <div class="menu-main-menu-container">

    and this is the code in the team players page:
    <div class="main-menu">

    Rename the div class to “menu-main-menu container” and it will get back to its original form! ??

    Thread Starter vectyr

    (@vectyr)

    Sure but that whole menu for both pages is being dynamically generated by this same code:

    <?php wp_nav_menu(array('menu' => 'main-menu','menu_class' => 'main-menu' )); ?>

    I can’t rename the div class ?? Am I missing something?

    try renaming the prefix for your php function.This might be caused due to a conflict with the plugin.It might be using the same prefix and wp_ is a very popular one.Rename it to something different and related to your site like jf_

    replace the code like this:
    <?php jf_nav_menu(array('menu' => 'main-menu','menu_class' => 'main-menu' )); ?>

    Thread Starter vectyr

    (@vectyr)

    That didn’t work ??

    The thing is that I have this same calendar working on two other sites, I’ve set everything up the same way too. It’s even the SAME core template.

    Maybe I can help you if i get to do it myself..

    Thread Starter vectyr

    (@vectyr)

    Go to vectyr.com and shoot me an email on the form at the bottom of the page and I can get you access.

    Thread Starter vectyr

    (@vectyr)

    Abinav and I worked on this thing for a few hours but our best efforts only discovered that for some reason on the two pages that were showing the calendar and list, an old navigation menu was being shown. One that was saved over a long time ago but that seems to still be recognized by the system.

    This menu code:
    <?php wp_nav_menu(array('menu' => 'main-menu','menu_class' => 'main-menu' )); ?>

    Is being used to specifically target the ONLY menu located in the menus area in the admin. Yet the calendar pages are showing an old menu from a long time ago when the store didn’t exist. No matter what changes I make to the above code, even to the specifying of different menus, it shows the old menu and even the code is different. Weeeeeeeird.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Weird Main Menu Code Hijinks! Help!!!’ is closed to new replies.