genesis theme event layouts

Home Forums Calendar Products Events Calendar PRO genesis theme event layouts

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1019082
    Jen Russo
    Participant

    I have the info from the knowledgebase on genesis theme

    Genesis Framework & Event Submissions

    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

    #1019105
    Brian
    Member

    Hi 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

    #1019466
    Jen Russo
    Participant

    Hi 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

    #1019515
    Brian
    Member

    Ok 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

    #1021068
    Jen Russo
    Participant

    Brian

    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

    #1021256
    Brian
    Member

    Hi Jen,

    Which coding did you use and what file did you put it in?

    Let me know.

    Thanks

    #1021403
    Jen Russo
    Participant

    Brian

    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.
    #1021625
    Brian
    Member

    Hi,

    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

    #1021692
    Jen Russo
    Participant

    Brian,

    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

    #1021713
    Brian
    Member

    Hi,

    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

    #1021725
    Jen Russo
    Participant

    Brian,

    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.

    Fullscreen%2011/4/15%206:02%20AM

    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’;
    }
    }
    }

    #1021762
    Brian
    Member

    Ok 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

    #1075382
    Support Droid
    Keymaster

    This 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.

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘genesis theme event layouts’ is closed to new replies.