Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Barry

    (@barryhughes-1)

    Hi @whapster!

    Organizer placeholders definitely needs to be improved since they were introduced prior to the introduction of multiple-organizer support in The Events Calendar and I haven’t yet decided how best to handle that.

    The {venue:details} bug sounds legitimate and I should be able to fix that shortly ??

    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.

    Plugin Author Barry

    (@barryhughes-1)

    Thanks for sharing ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘inline placeholder address – not showing’ is closed to new replies.