Events page in wp_list_pages()

Home Forums Calendar Products Events Calendar PRO Events page in wp_list_pages()

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #14334
    Cynthia
    Member

    Hey all-

    My wordpress site pulls pages for the main navigation using wp_list_pages(). The trouble I’m having is that either

    1) I use the events page as created by the plugin and that page doesn’t get the current page highlighting like other pages.

    or

    2) I use the calendar grid function tribe_calendar_grid() on a manually created events page, where i do get current page highlighting, but I cant display the month text, or the next/prev month links, etc. and they aren’t displayed with the tribe_calendar_grid() function.

    Little help here would be nice

    #14460
    Rob
    Member

    Hi Cynthia. We would definitely be happy to help you out here. I’m not sure I would be best equipped to handle the ramifications of this but hopefully our dev Jonah can. I’ve asked him to chime in directly here.

    #14484
    Jonah
    Participant

    Hi Cynthia, do you have a site I can look at with an example?

    #14485
    Jonah
    Participant

    Try this:

    add_filter('nav_menu_css_class' , 'special_nav_class' , 10 , 2);
    function special_nav_class($classes, $item) {
    if($item->title == "Events") {
    $classes[] = "special-class";
    }
    return $classes;
    }

    Then you can target .special-class to style that menu item.

    #14490
    Cynthia
    Member

    actually, I figured it out!

    What tripped me up is that the calendar grid isn’t returned, its displayed, whereas some of the other links are returned. I apologize, I misread the documentation. 🙂

    Thanks!

    #14498
    Jonah
    Participant

    Awesome, glad to hear!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Events page in wp_list_pages()’ is closed to new replies.