Home › Forums › Calendar Products › Events Calendar PRO › Delete a comma 2
- This topic has 2 replies, 3 voices, and was last updated 10 years ago by
Support Droid.
-
AuthorPosts
-
March 24, 2016 at 7:03 am #1093383
Birgit Bauer
ParticipantHello,
I had a conversation on this topic before: https://theeventscalendar.com/support/forums/topic/delete-a-comma/Now I could get into the problem but the solution didn’t work.
I edited the code and finally deleted all commas inside this area .. but the comma is still displayed:/** * Returns the full address of an event along with HTML markup. It * loads the full-address template to generate the HTML */ public function fullAddress( $post_id = null, $includeVenueName = false ) { global $post; if ( ! is_null( $post_id ) ) { $tmp_post = $post; $post = get_post( $post_id ); } ob_start(); tribe_get_template_part( 'modules/address' ); $address = ob_get_contents(); ob_end_clean(); if ( ! empty( $tmp_post ) ) { $post = $tmp_post; } return $address; } /** * Returns a string version of the full address of an event * * @param int|WP_Post The post object or post id. * * @return string The event's address. */ public function fullAddressString( $postId = null ) { $address = ''; if ( tribe_get_address( $postId ) ) { $address .= tribe_get_address( $postId ); } if ( tribe_get_city( $postId ) ) { $address .= tribe_get_city( $postId ); } if ( tribe_get_region( $postId ) ) { $address .= tribe_get_region( $postId ); } if ( tribe_get_zip( $postId ) ) { $address .= tribe_get_zip( $postId ); } if ( tribe_get_country( $postId ) ) { $address .= tribe_get_country( $postId ); } return $address; }here is how it looks like:
http://screencast.com/t/h1UGI3he
http://screencast.com/t/8wb9RwJcTkAnd here is how I did the setup for the Addres to display like we do in Austria:
http://screencast.com/t/sLxZmwacvkcAs you can see, the comma is set to be displayed to seperate the ZIP (PLZ) but I left the field empty because I need the ZIP to be displayed in front of the city and therefore added it to the city field.
Any other idea where I could dlete this comma?
Thank you!
March 25, 2016 at 6:59 am #1093930Brian
MemberHi,
Thanks for using our plugins. I can help out here, but I am limited in support customizations and might not be able to provide all the coding.
The comma is being put there by another method in the main class.
There is no way to change that without editing the core files, which means changes are lost on updates.
Instead I would in this file:
plugins/the-events-calendar/src/views/modules/meta/venue.php
After moved to your theme here:
your-theme/tribe-events/modules/meta/venue.php
Following our themer’s guide:
https://theeventscalendar.com/knowledgebase/themers-guide/
And instead of this:
<?php echo tribe_get_full_address(); ?>Use this to get the address the way you would like:
<?php
$venueId = tribe_get_venue_id();
echo tribe_get_address( $venueId );
echo '<br>' . tribe_get_city( $venueId );
?>That would have to be changed in the list view template as well.
plugins/the-events-calendar/src/views/list/single-event.php
Cheers
April 9, 2016 at 9:35 am #1100419Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Delete a comma 2’ is closed to new replies.
