• /**
    	 * Event Title
    	 *
    	 * Return an event's title with pseudo-breadcrumb if on a category
    	 *
    	 * @param bool $depth include linked title
    	 * @return string title
    	 * @since 2.0
    	 */
    	function tribe_get_events_title( $depth = true )  {
    		$tribe_ecp = TribeEvents::instance();
    
    		$title = __('Calendar of Events', 'tribe-events-calendar');
    		if ( is_tax( $tribe_ecp->get_event_taxonomy() ) ) {
    			$cat = get_term_by( 'slug', get_query_var('term'), $tribe_ecp->get_event_taxonomy() );
    			if ( $depth ) {
    				$title = '<a href="'.tribe_get_events_link().'">'.$title.'</a>';
    				$title .= ' › ' . $cat->name;
    			} else {
    				$title = $cat->name;
    			}
    		}
    
    		return $title;
    	}

    When I’m on the calendar or list view the function above is changing my Superfish dropdowns on my main navigation to say “Calendar of Events”. I’m using a link to the /events page instead of putting it directly in the navigation. If I do put the /events page directly in the navigation it changes every item in my nav to say “Calendar of Events”. I don’t really know PHP but I’ve tried numerous things to fix this to no avail. I’m assuming this line of code is causing the problem:

    $title = __('Calendar of Events', 'tribe-events-calendar');

    If I change “Calendar of Events’ to say something like “poop” for instance it changes the navigation to say “poop”. Can anyone help? I’ve been messing with this forever. I did try the default WordPress theme and it isn’t an issue there, but changing themes at this point is not an option. TEC is exactly what I need for my client but this navigation problem is driving me nuts.

    https://www.ads-software.com/extend/plugins/the-events-calendar/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: The Events Calendar] Need Some PHP help – TEC function breaking Superfish dropdowns’ is closed to new replies.