How can we help?
-
Getting Started
-
Shortcodes
-
Settings
-
Event Dashboard
-
Custom Fields
-
Categories & Types
-
Widgets
-
Troubleshooting
- Dealing with problematic themes
- Enable Trace and Debug Javascript file logs
- Event listing styling and fonts problem
- Event listings not showing up in the [events] page
- Event listings throw 404 page error
- Events don’t display until RESET is pressed
- How to add my registrations on my account page
- Woocommerce cart fragment-jquery cookie problem
-
Advanced / Customisation
-
WP Event Manager Tutorials
- Add a custom field in the search form on the event dashboard
- Add custom field in Search filter
- Adding a country field for events
- Change Default Events Listing View
- Changing Login Redirects
- Changing the event slug/permalink
- Changing the priority of field for event submission form
- Create Child Theme
- Create default image path filter
- Create or pick categories from Free/ Core WP Event manager
- Create single event template with Elementor Pro
- Creating a custom event search form
- Cron Job
- Disable Any theme timepicker
- Editing Event Submission Form Fields
- Event Detail Page
- Event List with Elementor plugin
- Hide Additional Information Section from Single Event Page
- Hide and Add column from the Event Dashboard
- Hide Comment on Single Event Listing Page
- How To Add My Registrations on My Account Page
- How to allow comment forms on each event?
- How to allow organizers to add images in the description box
- How to delete an expired event by time
- How to Disable Social Media share links?
- How to display additional custom fields on a single event page?
- How to override archive template
- How To Remove Duplicate Event Type Meta Box While Using Gutenberg Editor
- How to replace default event banner placeholder image
- Importing Event Listings With WP All Import Pro
- Limit the banner Size
- List of all the default template and fields given in core and Premium Add-ons
- Multilingual Website Using WPML
- Ordering Events By Event Start Date / meta key
- Remove existing field from event submission form
- Remove the Preview Step
- Translating WP Event Manager
- Validate submit event field Snippets
- Visual Composer
- How to Download and Edit the Prebuilt Theme by WP Event Manager
- Show all articles ( 25 ) Collapse Articles
-
Add-ons
- Attendee Information
- Bookmarks
- Colors
- Contact Organizer
- Emails
- Embeddable Event Widget
- Event Alerts
- Event Calendar
- Event iCal
- Event Slider
- Event Tags
- Export Events
- Google Analytics
- Google Maps
- Google reCAPTCHA
- Mailchimp
- Organizers
- Recurring Events
- Registrations
- Sell Tickets
- Sendinblue
- Stripe Split Payment
- Woocommerce Paid Listings
- Zoom
- Mobile App
- Divi Elements
- Guest List
- Constant Contact
- Active Campaign
- HubSpot CRM Integration
- Salesforce CRM Integration
- Zoho CRM Integration
- Name Badges
- Show all articles ( 18 ) Collapse Articles
-
Add ons Tutorials
- Attendee limit on registration addon
- Change the domain of license key (license key migration )
- Editing registration form fields
- Event tag snippets
- Existing Licence Key Activation
- Exporting Registrations
- Facebook Preview
- Field restriction on the registration form without sell ticket and attendee information
- Hide/Show registration button on specific events
- How To Install WP Event Manager Add ons
- How to show Ticket Price
- Send an email notification to the organizer when a event is approved
-
Virtual Addons
-
Themes
How to show Ticket Price
Created On
Last Updated On
Print
1
7
- Main
- Add ons Tutorials
- How to show Ticket Price
WP Event Manager Add ons Tutorials explains you, How to show ticket price field to the frontend.
Show ticket price at events listing
- Open your theme function.php file
- Create a function to append a new field to the events section.
- Add the following code for getting event ticket price:
function get_custom_event_ticket_price( ) { global $post; if ( $post->post_type !== 'event_listing' ) return; return apply_filters( 'display_custom_event_ticket_price', $post->_event_ticket_price, $post ); }
- Add the following code 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 ) return; $event_ticket_price = esc_attr( strip_tags( $event_ticket_price ) ); $event_ticket_price = $before . $event_ticket_price . $after; if ( $echo ) echo $event_ticket_price; else return $event_ticket_price; }
- Open your theme content-event_listing.php file and echo event ticket price.
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.
Quick Links