Home / Admin / Filter the Event Title | Display Eventbrite Events
Duplicate Snippet

Embed Snippet on Your Site

Filter the Event Title | Display Eventbrite Events

Example, adding Organizer Name to the front of Event Title.

(Note this code snippet applies for "Display Eventbrite Events Plugin" available here: https://fullworksplugins.com/products/widget-for-eventbrite/ )

Code Preview
php
<?php
add_filter(
	'the_title',
	function ( $title) {
		$post = get_post();
		if ( ! property_exists( $post, 'eb_url' ) ) {
			return $title;
		}
		return '<strong>' . esc_attr( $post->organizer->name ) . ': </strong>' . $title;
	},
	999,
	1 );

Comments

Add a Comment