Support » Plugin: The Events Calendar » [Plugin: The Events Calendar] wp_nav_menu problem when installed as a sub-domain

  • Resolved TJ-Resurs


    I have a calendar on a site where the admin sits as subdomain of my main server, while the public site is found on a www domain with the help of domain mapping for wordpress multisite.

    For navigation I use wp_nav_menu and has added the event main category and its sub-categorys as subpages in the menu setup. And If i set the subdomain address as main address it will work and I will get the class of:
    <li class="menu-item menu-item-type-custom menu-item-4927 current-menu-item">...</li>
    Where the current-menu-item is used to reveal the sub-categories of the event calendar with the help of css.

    But if I set the www-address as main domain and access the site The Events Calendar will not recognise that the page is accessed and only output:
    <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-4927">...</li>
    And since my subpages in the menu is only displayed on active pages with the help of these classes the menu don’t work as thought…

    While writing this I got an idea and found a solution/work-around, you can manipulate the menu to show it sub pages if you use the output from the body tag:
    <?php body_class(); ?>
    Then your css should become something like this: ul#wp_nav_menu ul {code to use when active...}
    So see this as a work around and a pointer to an area of improvement in a already great plugin


Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Rob La Gatta


    Hi there Thomas. Thanks for the note on this, and for providing this detailed explanation. While this goes a bit above my head, technically speaking, I’ve asked Jonah from our dev team to take a look. If such a tweak is easy to make and won’t have any other impacts we’ll definitely plan to include it in a future release. I’ll let you know either way.

    Cheers, and thanks again for using The Events Calendar.

    Hi Thomas,

    I’m not quite understanding what the problem is. Can you provide an actual example I can take a look at?


    Hello Jonah,
    You can find a live example here

    While digging deeper into this now I saw that an url had been added to the menu item in the backend menu editor of wordpress. So the problem occured because of the url given was not “” but “”

    Hey Thomas,

    Ok, so is the issue fixed now?

    – Jonah

    Hey Jonah,
    yeah the issue is fixed, just had to change those url’s and it all worked great. Perhaps these posts can help someone else who get the same problem 🙂


    Hey Thomas,

    Definitely man. Well I’m glad that solved the issue for you. Let us know if you need anything else.

    – Jonah

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: The Events Calendar] wp_nav_menu problem when installed as a sub-domain’ is closed to new replies.