How to show Ticket Price

Show a ticket price at events listing

This tutorial explain you, How to show the ticket price field to the frontend.

Open your theme function.php file and create a function to append a new field to the events section.

Write the below function for getting event ticket price:

function get_custom_event_ticket_price( $post = null ) {
    $post = get_post( $post );
    if ( $post->post_type !== 'event_listing' )

    return apply_filters( 'display_custom_event_ticket_price', $post->_event_ticket_price, $post );

Write the below function for displaying event ticket price:

function display_custom_event_ticket_price( $before = '', $after = '', $echo = true, $post = null ) {

    $event_ticket_price = get_custom_event_ticket_price( $post );

    if ( strlen( $event_ticket_price ) == 0 )
    $event_ticket_price = esc_attr( strip_tags( $event_ticket_price ) );

    $event_ticket_price = $before . $event_ticket_price . $after;

    if ( $echo )
        echo $event_ticket_price;
        return $event_ticket_price;

Open your theme content-event_listing.php file and echo event ticket price.

<?php printf( __( 'Ticket Price: %s', 'wp-event-manager' ), get_custom_event_ticket_price() ); ?>

Fields added using the above code will be show to the event ticket price automatically.There is two layout available box layout and line layout so add your above code where you want to show ticket price or you can add in both layout.