Problem with multiple category

Home Forums Calendar Products Events Calendar PRO Problem with multiple category

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #999937
    Martino
    Participant

    Hi 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?

    #1000025
    George
    Participant

    Hey @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

    #1000357
    Martino
    Participant

    Hi 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.

    #1000965
    George
    Participant

    Hey 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,
    George

    #1005174
    Martino
    Participant

    Hi 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 wrong

    Also, if you click on the place (Hops Beer Shop) it goes to a not found page.

    Thanks!

    #1005695
    George
    Participant

    Hey 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,
    George

    #1010402
    Support Droid
    Keymaster

    This 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.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Problem with multiple category’ is closed to new replies.