Hi Ed,
Thanks for your response.
I found it easiest, for now, just to work with custom templates, although I have found in the past templates tend to age sooner then expected so I often rather use hooks and functions instead.
Aside: A bit burdersome that your documentation shows such an extended list of deprecated functions, making it more work to find the current ones. Might it be an idea to separate or filter them, since I imagine we need to use only the not-deprecated functions anyway?
I wasn’t yet able to set the correct table in the essence pro header, since the essence pro hook essence_entry_header is hooked on the genesis_before_header hook, instead of the genesis_entry_header hook. I’m guessing that not all titles are available yet at that point.
So single event pages don’t have a title in the theme’s header yet, since the_title() is still empty at that point and tribe_get_events_title() is showing something generic rather than the single event’s title. And the archive titles are also not always the same at this hook (photo view shows the wrong end date f.i.). So it probably needs to be called from within the loop, or something. I understand that this is customization and not the target of your support, so I will puzzle some more myself.
For what it’s worth I also used another workaround to make TEC display right in Genesis, rather then using the code in the genesis integration guide to be used when the archive settings disturb the correct display of TEC archives. You’ll find the code at the bottom here.
I opted for code that forces the archive settings for specifically the TEC archive pages. In doing that there was no need to remove standard genesis code and it could always be added so whatever settings are set, it always works. Probably the only setting that was needed was setting the “limit content to” option to 0, but this works. Other options, when needed, can of course be forced too.
Props to WP Beaches and the blog article Changing the Genesis Archive Page Settings for Custom Post Types.
add_action('genesis_before_loop','tvu_TEC_set_genesis_for_events_display');
function tvu_TEC_set_genesis_for_events_display() {
if ( class_exists( 'Tribe__Events__Main' ) )
{
// when TEC Pro is active,
// check if current page is a standard TEC archives view
if ( tribe_is_month()
|| tribe_is_upcoming()
|| tribe_is_past()
|| tribe_is_day() )
{
// force genesis archives options for correct display of TEC content
tvu_force_TEC_genesis_content_archives_options();
} elseif ( class_exists( 'Tribe__Events__Pro__Main' ) )
{
// when TEC Pro is active,
// check if current page is a standard TEC Pro archives view
if ( tribe_is_map()
|| tribe_is_photo()
|| tribe_is_week()
|| ( tribe_is_recurring_event() && ! is_singular( 'tribe_events' ) ) )
{
// force genesis archives options for correct display of TEC content
tvu_force_TEC_genesis_content_archives_options();
}
}
}
}
function tvu_force_TEC_genesis_content_archives_options() {
// Set layout to full-width
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
// Set display option to full content
add_filter( 'genesis_pre_get_option_content_archive', 'tvu_cpt_change_content' );
function tvu_cpt_change_content()
{
return 'full';
}
// Set limit content to option to 0 characters
add_filter( 'genesis_pre_get_option_content_archive_limit', 'tvu_cpt_change_content_limit' );
function tvu_cpt_change_content_limit()
{
return 0;
}
}