Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Get the venue ID for this event
- $venueID = tribe_get_venue_id();
- // Check that a valid venue ID was returned ("0" may be returned if none is assigned)
- if (is_numeric($venueID) and $venueID > 0) {
- // Get the slug
- $venue = get_post($venueID);
- $venueSlug = $venue->post_name;
- }
- else {
- // Otherwise, set the slug to an empty string
- $venueSlug = '';
- }
- // Take $venueSlug and use as CSS class
- echo '<div class="'.$venueSlug.'">'; // etc...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement