WordPress.org

Forums

The Events Calendar
[resolved] Parent Page Issue (24 posts)

  1. tributeWP
    Member
    Posted 2 years ago #

    It's a small issue, but one I can't seem to resolve: when the user is on my events page, two pages are highlighted as the current page in the navigation.
    Here's my events page
    It seems to regard my News page as the parent to my Events page.

    <li id="menu-item-1963" class="menu-item menu-item-type-post_type menu-item-object-page current_page_parent menu-item-1963">
    <a href="http://www.911families.org/news/">News</a>
    </li>
    <li id="menu-item-1967" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item menu-item-1967">
    <a href="http://www.911families.org/events/">Events</a>
    </li>

    What can I do to prevent News from being identified as the parent page?

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

  2. Rob La Gatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Hey there tributeWP. That's really odd. I am indeed seeing the issue there but have no idea what would be causing it. Let me see if a member of the dev team has any ideas; while I can't guarantee anything, if this is something our plugin can be tweaked to improve performance on...we'll definitely do what we can. Stay tuned and thanks for your patience so far.

  3. jonahcoyote
    Member
    Posted 2 years ago #

    Hi tributeWP,

    That's weird. Not exactly sure why it's happening but what I would suggest is to modify your CSS like so:

    FROM:

    .sf-menu .current-menu-item a, .sf-menu .current-menu-parent a, .sf-menu .current-menu-ancestor a, .sf-menu .current-post-ancestor a, .sf-menu .current_page_item a, .sf-menu .current_page_ancestor a, .sf-menu .current_page_parent a {
    border-bottom-color: none;
    background-color: #008BCC;
    color: #EDA432;
    }

    TO:

    .sf-menu .current-menu-item a, .sf-menu .current-menu-ancestor a, .sf-menu .current-post-ancestor a, .sf-menu .current_page_item a, .sf-menu .current_page_ancestor a {
    border-bottom-color: none;
    background-color: #008BCC;
    color: #EDA432;
    }

    Let me know whether or not that works.

    Cheers,
    Jonah

  4. tributeWP
    Member
    Posted 2 years ago #

    Hey jonahcoyote-
    Thanks so much!
    That worked so that "News" is no longer highlighted on my Events page, but now on subsections of both the Events page and News page (calendar view, categories for the blog), the current item isn't highlighted.
    Clearly, the current_page_parent tag is a problem here but I'm at a loss for the solution.

  5. jonahcoyote
    Member
    Posted 2 years ago #

    Hi tributeWP,

    Add the following to your CSS to get blog related pages to highlight News:

    .archive .sf-menu .menu-item-1963 a,
    .single-post .sf-menu .menu-item-1963 a {
    border-bottom-color: none;
    background-color: #008BCC;
    color: #EDA432;
    }

    I hope that helps!
    - Jonah

  6. tributeWP
    Member
    Posted 2 years ago #

    Thanks, Jonah! That absolutely did the trick for the News section!
    Now to resolve the sub-pages for my Event calendar...

  7. Rob La Gatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Hey tributeWP...great to hear this did the trick so far. Do you need advise on that last bit or are you set there by this point? Let us know.

  8. tributeWP
    Member
    Posted 2 years ago #

    Hey Roblagatta,

    Yeah, I haven't quite worked out how to get my Event sub-pages in order. Any advice would be welcome!

  9. jonahcoyote
    Member
    Posted 2 years ago #

    Hi tributeWP,

    What's the problem with your event sub-pages? And, what sub-pages specifically are you talking about?

    Thanks,
    Jonah

  10. tributeWP
    Member
    Posted 2 years ago #

    Hey Jonah,

    When I go to events/month/ -so any part of the calendar, Events in the navigation is not highlighted. The same goes for events/upcoming/
    On all of the posted event pages, Events in the navigation is highlighted, so the issue seems to only exist on those two sections.

    Thanks!

  11. jonahcoyote
    Member
    Posted 2 years ago #

    Hi tributeWP,

    You'll need to again modify your CSS to highlight whatever items you want on specific pages. We can't help you with all the possible variations for this. To get the Events link highlighted when on that page I would suggest first adding a class to the Events menu item in Appearance > Menus (toggle in Screen Options if you don't see it as an option for your menu items). Give it a class of "events".

    Then, in your CSS:

    .events-gridview .events a {
    border-bottom-color: none;
    background-color: #008BCC;
    color: #EDA432;
    }

    I hope that helps! You're going to need to figure out the rest on your own but hopefully this steers you in the right direction. Good luck!

    - Jonah

  12. tributeWP
    Member
    Posted 2 years ago #

    Thanks so much for all your help! Very much appreciated.

  13. Rob La Gatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Glad to be of service, tributeWP! Thanks for confirming that you're all set here. I'm going to close this out and mark it Resolved unless you disagree...but please let us know what else we can do in the future. Thanks again for your support and use of the plugin.

  14. tributeWP
    Member
    Posted 2 years ago #

    Yep, all resolved. Again, thanks!!

  15. Rob La Gatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Fantastic to hear. If you need anything else down the road, just holler.

  16. savvystephy
    Member
    Posted 2 years ago #

    Hello there,

    I am having the same issue. I followed this and got it to work on the calendar pages, but not the events list page (events/upcoming or events/past).

    Is there a separate css class that is used for that page? I tried with the menu item having .events and .events-gridview and even tried .events-listview to see if that works (totally guessing on css naming) which it didn't.

    Any ideas?

    Thanks!
    -Stephanie

  17. jonahcoyote
    Member
    Posted 2 years ago #

    Hey savvystephy,

    It could be totally different in your case because the CSS classes in your theme for your menu might be different. Do you have a link to your site?

    Thanks,
    Jonah

  18. savvystephy
    Member
    Posted 2 years ago #

    Hi Jonah,

    Thanks for your response! Unfortunately, since the website is for a gov't customer, I can't share it with you. :-( Can I post some code that will give you insight? We use the Atahualpa theme (http://wordpress.org/extend/themes/atahualpa).

    The .events css class definitely caused the menu item to highlight now for all months, just have to figure out what makes it highlight for the grid/list view.

    Thanks,
    Stephanie

  19. jonahcoyote
    Member
    Posted 2 years ago #

    Hi Stephanie,

    Without being able to look at your site there's not much else I can do. You'll need to figure it out on your own or hire someone to help you. Good luck!

    - Jonah

  20. savvystephy
    Member
    Posted 2 years ago #

    Thanks for the attempt to help anyway! I'll need all the luck I can get. ;-)

    -Stephanie

  21. Rob La Gatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Sorry we couldn't do more here, Stephanie. Thanks again for your support and use of The Events Calendar...should you need us to take a look at anything else down the road, please just let us know. Cheers!

  22. savvystephy
    Member
    Posted 2 years ago #

    I just wanted to let you know I figured it out, just in case anyone searches for the solution to the same problem.

    Add into css:

    .events-gridview .events a {
    CSS Properties
    }
    
    .events-list .events a {
    CSS Properties
    }
  23. Rob La Gatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Glad to hear you got this sorted, savvystephy! This will be valuable for others down the road who face your same problem and we appreciate you taking the time to come back in here and share it. Thanks again.

  24. Rob La Gatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Glad to hear you got this sorted, savvystephy! This will be valuable for others down the road who face your same problem and we appreciate you taking the time to come back in here and share it. Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic