Home › Forums › Calendar Products › Events Calendar PRO › Problem with multiple category
- This topic has 6 replies, 3 voices, and was last updated 10 years, 6 months ago by
Support Droid.
-
AuthorPosts
-
August 28, 2015 at 9:07 am #999937
Martino
ParticipantHi there, I’ve a problem on displayng the categories of an event if I select more than one category.
You can see it here
http://www.fuoriregata.it/evento/folli-folletti/2015-10-02/The string “Event category” is missing.
IS it fixable?
August 28, 2015 at 11:45 am #1000025George
ParticipantHey @Martino!
I’m really sorry you’ve run into this issue on your site – it could be an issue with the way we translate strings in our code, or with your translation file itself. I’m not sure, and will take some time to investigate this further and will make a bug report so we can fix it in a future release if we find a bug here.
For now, however, you should be able to fix this by adding the following code to your theme’s functions.php file:
add_filter( 'tribe_get_event_categories', 'tribe_999937_filter_category_dt', 1, 4 );function tribe_999937_filter_category_dt( $html, $post_id, $args, $categories ) {
return str_replace( ':', 'Replace Event Categories', $html );
}
Now, instead of ‘Replace Event Categories’ in that code, replace it with whatever text you want in Italian or anything you’d like.
I hope this helps!
– George
August 31, 2015 at 1:44 am #1000357Martino
ParticipantHi George,
thanks for the fast reply.I need that string to be multilingual: I’m using WPML, do you thing there is a way to write it so I can translate it?
Thanks, m.
September 1, 2015 at 10:45 am #1000965George
ParticipantHey Martino,
You can definitely make the string translatable according to WordPress standards – I cannot speak, however, to whether or not WPML will then handle that well.
You can make the string translatable like this – instead of having just this bit of code:
return str_replace( ':', 'Replace Event Categories', $html );
You can use this instead:
return str_replace( ':', __( 'Replace Event Categories', 'tribe-events-calendar' ) , $html );
I hope that helps!
Cheers,
GeorgeSeptember 15, 2015 at 2:15 am #1005174Martino
ParticipantHi George,
I used your solution but, as you can see here,
there is a bit of a problem with the string and with the link
http://www.fuoriregata.it/evento/hops-beer-music-festival/2015-10-08/– the string is double (Event categoryEvent categories)
– the link is wrongAlso, if you click on the place (Hops Beer Shop) it goes to a not found page.
Thanks!
September 16, 2015 at 11:25 am #1005695George
ParticipantHey Martino,
It sounds like other issues are arising here that are unrelated to the code I shared above. As noted, your core question is about WPML which I wasn’t able and am still not able to fully answer, since we don’t offer support for WPML, but the code I shared just made a string “translatable” according to default WordPress standards.
So, to start with, you can first try removing that custom code I shared. Does anything improve on your site?
If not, then your best bet is to make sure that you update your version of The Events Calendar to 3.12.1, and your versions of all other Tribe plugins to 3.12.
If updating does not help, either, then go to Settings > Permalinks in your admin area, and just click “Save Changes” without actually making any changes, This may seem like an odd thing to do but is a little “trick” within WordPress to get the permalinks across your site to refresh, which might help here.
If even after all of this, you still have issues, then unfortunately your best option is to run through the troubleshooting steps outlined here → https://theeventscalendar.com/knowledgebase/testing-for-conflicts/
Check on the issues you reported here after each step in that process, and report your findings.
I hope all this information helps @Martino! Let us know what you find in your troubleshooting 🙂
Cheers,
GeorgeOctober 1, 2015 at 7:05 am #1010402Support 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 ‘Problem with multiple category’ is closed to new replies.
