Skip to content

Instantly share code, notes, and snippets.

@InoPlugs
Last active December 16, 2015 13:29
Show Gist options
  • Save InoPlugs/5442030 to your computer and use it in GitHub Desktop.
Save InoPlugs/5442030 to your computer and use it in GitHub Desktop.
<?php
add_filter('avf_title_args', 'fix_events_page_title', 10, 2);
function fix_events_page_title($args,$id)
{
if (get_query_var('post_type') == 'tribe_events' && !is_single())
{
if((tribe_is_upcoming() || tribe_is_past()))
{
$args['title'] = 'Events List';
}
else if(tribe_is_showing_all())
{
$args['title'] = 'List all events';
}
else
{
$args['title'] = 'Gridview';
}
}
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment