WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
[resolved] wp_nav_menu problem when installed as a sub-domain (7 posts)

  1. TJ-Resurs
    Member
    Posted 1 year ago #

    Hello,
    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:

    body.events-list 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

    Thanks!
    //Thomas

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    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.

  3. jonahcoyote
    Member
    Posted 1 year ago #

    Hi Thomas,

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

    Thanks,
    Jonah

  4. TJ-Resurs
    Member
    Posted 1 year ago #

    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 "http://www.newwine.se/events/" but "http://newwine.svensk-media.se/events/"

  5. jonahcoyote
    Member
    Posted 1 year ago #

    Hey Thomas,

    Ok, so is the issue fixed now?

    - Jonah

  6. TJ-Resurs
    Member
    Posted 1 year ago #

    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 :)

    //T

  7. jonahcoyote
    Member
    Posted 1 year ago #

    Hey Thomas,

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

    - Jonah

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic