Home › Forums › Calendar Products › Events Calendar PRO › genesis theme event layouts
- This topic has 12 replies, 3 voices, and was last updated 10 years, 2 months ago by
Support Droid.
-
AuthorPosts
-
October 27, 2015 at 2:41 pm #1019082
Jen Russo
ParticipantI have the info from the knowledgebase on genesis theme
I want to change my event layouts to the content-sidebar options, but in
the area where you give the event layout change snippets, it does not say exactly which php file i should be targeting.
could you let me know?
thanks,
Jen
October 27, 2015 at 4:08 pm #1019105Brian
MemberHi Jen,
Are you trying to target all the Events Views (List, Month, Map, Etc)?
All those snippets go in the child theme’s functions.php so I am not sure what you mean by this:
“it does not say exactly which php file i should be targeting.”
Let me know and I can help out.
Thanks
October 28, 2015 at 11:45 am #1019466Jen Russo
ParticipantHi Brian,
yes I am trying to targe all the event views, as well as single event views, so that it uses our genesis content-sidebar style throughout.
I will put it in the child theme function.php file. let me know if you have any other suggestions.
Jen
October 28, 2015 at 1:10 pm #1019515Brian
MemberOk that should work.
If it does not work on some templates let me know what coding you use and I can try to give some pointers to fix it.
Thanks
November 2, 2015 at 6:53 pm #1021068Jen Russo
ParticipantBrian
I added the code but there is no change. I want the site sidebar to show up in events, similar to the setup with all other aspects of the site.
So we put in the ‘content-sidebar’ in the genesis code given in the knowledge base, and no change.
Is there something else I should be looking at?
thanks,
Jen
November 3, 2015 at 7:27 am #1021256Brian
MemberHi Jen,
Which coding did you use and what file did you put it in?
Let me know.
Thanks
November 3, 2015 at 11:07 am #1021403Jen Russo
ParticipantBrian
these are the addl tecp code added to the functions php file in my child theme. I have it in my staging environment
http://mauitime.staging.wpengine.com/events/the filter bar fix codes you see at the bottom work, but no change from the genesis code
/*
* Genesis Page Layout of The Event Calendar Main Events Templates (Month, List, Photo, Etc..)
* The Events Calendar @3.10
* Genesis @2.1.2
* Options – full-width-content, content-sidebar, sidebar-content, content-sidebar-sidebar, sidebar-sidebar-content, sidebar-content-sidebar
*/
//Target all Event Views (Month, List, Map etc)
add_filter( ‘genesis_site_layout’, ‘tribe_genesis_view_layouts’ );
function tribe_genesis_view_layouts() {if ( class_exists( ‘Tribe__Events__Main’ ) && class_exists( ‘Tribe__Events__Pro__Main’ ) ) {
if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || tribe_is_map() || tribe_is_photo() || tribe_is_week() ) {
return ‘content-sidebar’;
}
} elseif ( class_exists( ‘Tribe__Events__Main’ ) && !class_exists( ‘Tribe__Events__Pro__Main’ ) ) {
if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() ) {
return ‘content-sidebar’;
}
}
}
/*
* Genesis Layout of The Event Calendar Views for all Templates
* The Events Calendar @3.10
* Genesis @2.1.2
* Options – full-width-content, content-sidebar, sidebar-content, content-sidebar-sidebar, sidebar-sidebar-content, sidebar-content-sidebar
*/
//Target all Event Views (Month, List, Map etc), Single Events, Single Venues, and Single Organizers
add_filter( ‘genesis_site_layout’, ‘tribe_genesis_all_layouts’ );
function tribe_genesis_all_layouts() {if( class_exists( ‘Tribe__Events__Main’ ) && tribe_is_event_query() ) {
return ‘content-sidebar’;
}
}
/*
* Genesis Layout of The Event Calendar Single Templates
* The Events Calendar @3.10
* Genesis @2.1.2
* Options – full-width-content, content-sidebar, sidebar-content, content-sidebar-sidebar, sidebar-sidebar-content, sidebar-content-sidebar
*/
//Target Single Events, Single Venues, and Single Organizers
add_filter( ‘genesis_site_layout’, ‘tribe_genesis_single_layouts’ );
function tribe_genesis_single_layouts() {if( is_singular( ‘tribe_events’ ) || is_singular( ‘tribe_venue’ ) || is_singular( ‘tribe_organizer’ ) ) {
return ‘content-sidebar’;
}}
add_filter( ‘tribe_events_filter_values’, ‘remove_filter_values_limit’, 20, 2);
function remove_filter_values_limit ( $filter_values, $slug ) {global $wpdb;
if($slug == ‘venues’) {
// get venue IDs associated with published posts
$venue_ids = $wpdb->get_col( $wpdb->prepare( “SELECT DISTINCT m.meta_value FROM {$wpdb->postmeta} m INNER JOIN {$wpdb->posts} p ON p.ID=m.post_id WHERE p.post_type=%s AND p.post_status=’publish’ AND m.meta_key=’_EventVenueID’ AND m.meta_value > 0”, Tribe__Events__Main::POSTTYPE ) );
$venue_ids = array_filter( $venue_ids );
if ( empty( $venue_ids ) ) {
return array();
}$venues = get_posts( array(
‘post_type’ => Tribe__Events__Main::VENUE_POST_TYPE,
‘posts_per_page’ => -1, // remove arbitrary limit
‘suppress_filters’ => false,
‘post__in’ => $venue_ids,
‘post_status’ => ‘publish’,
‘orderby’ => ‘title’,
‘order’ => ‘ASC’,
) );$venues_array = array();
foreach ( $venues as $venue ) {
$venues_array[] = array(
‘name’ => $venue->post_title,
‘value’ => $venue->ID,
);
}$filter_values = $venues_array;
}if($slug == ‘organizers’) {
$organizer_ids = $wpdb->get_col( $wpdb->prepare( “SELECT DISTINCT m.meta_value FROM {$wpdb->postmeta} m INNER JOIN {$wpdb->posts} p ON p.ID=m.post_id WHERE p.post_type=%s AND p.post_status=’publish’ AND m.meta_key=’_EventOrganizerID’ AND m.meta_value > 0”, Tribe__Events__Main::POSTTYPE ) );
array_filter( $organizer_ids );
if ( empty( $organizer_ids ) ) {
return array();
}
$organizers = get_posts( array(
‘post_type’ => Tribe__Events__Main::ORGANIZER_POST_TYPE,
‘posts_per_page’ => -1, // remove arbitrary limit
‘suppress_filters’ => false,
‘post__in’ => $organizer_ids,
‘post_status’ => ‘publish’,
‘orderby’ => ‘title’,
‘order’ => ‘ASC’,
) );$organizers_array = array();
foreach ( $organizers as $organizer ) {
$organizers_array[] = array(
‘name’ => $organizer->post_title,
‘value’ => $organizer->ID,
);
}
$filter_values = $organizers_array;
}return $filter_values;
}-
This reply was modified 10 years, 5 months ago by
Jen Russo.
November 4, 2015 at 5:40 am #1021625Brian
MemberHi,
I think I found the issue.
The snippets only work if using the Default Page Template setting here:
Events > Settings > Display Tab > Events Template > Default Page Template
When I had that set to Default Event Template it did not work for me either.
Also, if you are targeting all Event Pages you only need this snippet and not the other two:
/*
* Genesis Layout of The Event Calendar Views for all Templates
* The Events Calendar @3.10
* Genesis @2.1.2
* Options – full-width-content, content-sidebar, sidebar-content, content-sidebar-sidebar, sidebar-sidebar-content, sidebar-content-sidebar
*/
//Target all Event Views (Month, List, Map etc), Single Events, Single Venues, and Single Organizers
add_filter( 'genesis_site_layout', 'tribe_genesis_all_layouts' );
function tribe_genesis_all_layouts() {if ( class_exists( 'Tribe__Events__Main' ) && tribe_is_event_query() ) {
return 'content-sidebar';
}
}
Let me know if changing the event template helps.
Thanks
November 4, 2015 at 7:16 am #1021692Jen Russo
ParticipantBrian,
ok yes now I do have the side bar but the page is doing something weird. I have it set to show photo view, but it is doing something different here:
http://mauitime.staging.wpengine.com/events/
how do i get sidebar and photo view?
thanks!
Jen
November 4, 2015 at 7:50 am #1021713Brian
MemberHi,
The page is password protected so I could not see.
I can take a look, but may not be able to solve the issue as theme compatibility is beyond the support we can provide for the most part.
Let me know though as I may still have a fix.
Thanks
November 4, 2015 at 8:09 am #1021725Jen Russo
ParticipantBrian,
dang it I always forget that there is a pssword on staging.
ok I realized there is another snippet in the knowledgebase – that fixes the excerpt view. see below. now I have a different thing coming up – its a phantom half photo. and the top has a big space not sure why.

to look go to the staging link i gave you login is 9 pass is seeds
knowledge base code for post excerpt fix
/*
* Filter for Full Content on The Events Calender(3.8) Views Page in Genesis(2.1.2) when using Default Page Template in Event Display Settings
* Shows Event Calendar Views Such as Month, List, etc even if Content Archive Setting in Genesis is set to Display post excerpts
* The Events Calendar @3.10
* Genesis @2.1.2
*/
add_filter( ‘genesis_pre_get_option_content_archive’, ‘tribe_genesis_event_archive_full_content’ );
function tribe_genesis_event_archive_full_content() {if ( class_exists( ‘Tribe__Events__Main’ ) && class_exists( ‘Tribe__Events__Pro__Main’ ) ) {
if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || tribe_is_map() || tribe_is_photo() || tribe_is_week() ) {
return ‘full’;
}
} elseif ( class_exists( ‘Tribe__Events__Main’ ) && !class_exists( ‘Tribe__Events__Pro__Main’ ) ) {
if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() ) {
return ‘full’;
}
}
}November 4, 2015 at 9:13 am #1021762Brian
MemberOk Thanks.
It appears that image is there because of the include the Featured Image? is checked in the Genesis Archive Settings
If you uncheck it, that should fix the issue.
Or you can try this css to hide it:
.post-type-archive-tribe_events .entry-content a .entry-image {
display: none;
}There is not filter to change that setting on the content archives so these appear to be the only solutions.
Let me know how that works out.
Thanks
February 18, 2016 at 8:30 am #1075382Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
This reply was modified 10 years, 5 months ago by
-
AuthorPosts
- The topic ‘genesis theme event layouts’ is closed to new replies.
