Ben Jones Ben Jones - 1 year ago 138
PHP Question

Wordpress PHP plugin code

Hi I need help with modifying the below PHP. Essentially I need to insert a separator in the output between $time & $Venue and turn the venue into a Hyperlink with a fixed URL.


if ( ! function_exists( 'TCG_eventbrite_event_meta' ) ) :
function TCG_eventbrite_event_meta() {
// Determine our separator.
$separator = apply_filters( 'eventbrite_meta_separator', '<span class="sep"> &middot; </span>' );
// Start our HTML output with the event time.
$time = '<span class="event-time">' . eventbrite_event_time() . '</span>';
// Add a venue name if available.
$venue = '<span class="event-venue">' . eventbrite_event_venue()->name . '</span>';
// Assemble our HTML. Yugly.
$html = sprintf( _x( '%1$s%2$s', '%1$s: time, %2$s: venue', 'eventbrite-api' ),
echo apply_filters( 'eventbrite_event_meta', $html, $time, $venue );

Answer Source

Fastest soultion is this:

$venue = ' | <span class="event-venue"><a href="http//" target="_blank">' . eventbrite_event_venue()->name . '</a></span>';
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download