Forum Replies Created

Viewing 1 replies (of 1 total)
  • For those interested, I came up with a solution for this problem using custom shortcodes.

    Found the hooks (I think that’s what they are) here in the event calendar plugin file venue.php

    tribe_get_address( $postId ) ||
    tribe_get_city( $postId ) ||
    tribe_get_region( $postId ) ||
    tribe_get_country( $postId ) ||
    tribe_get_zip( $postId ) ||

    Used these as a reference to write the following code for my theme’s functions.php file. I used the custom shortcodes in my page.

    add_filter( 'eventrocket_embedded_event_placeholders', 'event_tags' );
    
    	function event_tags( $placeholders ) {
    	    $placeholders['{thumbnail_small}'] = 'thumbnail_small';
    	    $placeholders['{start_month}'] = 'start_month';
    	    $placeholders['{start_day}'] = 'start_day';
    	    $placeholders['{venue_address}'] = 'venue_address';
    	    return $placeholders;
    	}
    
    	function thumbnail_small() {
    	    return tribe_event_featured_image( $event_id, 'rect600x400', false );
    	}
    
    	function start_month() {
    	    return tribe_get_start_date( $event, null, 'F' );
    	}
    
    	function start_day() {
    	    return tribe_get_start_date( $event, null, 'd' );
    	}
    
    	function venue_address() {
    		$address = tribe_get_address();
    		if (!empty($address)) {
    			return tribe_get_address() . '<br/>' . tribe_get_city() . ', ' . tribe_get_region();
    		}
    	}

    Elaborate on that as you wish.

Viewing 1 replies (of 1 total)