Relabeling Organizer label

Home Forums Calendar Products Events Calendar PRO Relabeling Organizer label

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #951750
    profeddieb
    Participant

    I have read the great article about doing this. And I have thrown this snippet:
    <?php
    add_filter(‘tribe_organizer_label_singular’, ‘change_single_organizer_label’ );
    function change_single_organizer_label() {
    return ‘Company’;
    }

    add_filter(‘tribe_organizer_label_plural’, ‘change_plural_organizer_label’ );
    function change_plural_organizer_label() {
    return ‘Companies’;
    }
    ?>
    on to my functions.php. I am not seeing any difference in labelling. Can’t figure out why this is not working, or if I have done something wrong. I am using a child theme, and updating the function.php in my child theme, not in the parent.

    Any ideas why this is being ignored?

    Thanks in advance.

    #951761
    George
    Participant

    Hey Ed!

    Thanks for reaching out – just to be clear, you mention in your post here that you added this code to your function.php, not functions.php. Note that subtle difference, the last one being the plural “functions”. It seems really small, and this may just be a typing mistake or something, but I just wanted to check in on it. You should ensure that its functions.php in both the parent theme and the child theme, not function.php.

    Once you’re sure of that, I’m curious – if you add this code to your Parent theme’s functions.php, and then deactivate your child theme temporarily and activate your parent theme, does the code seem to actually take effect? Or does it not work regardless of whether the parent or child is active?

    Finally, for now, can you post the complete functions.php files into separate Gists at http://gist.github.com and share links to those Gists?

    Thanks!
    George

    #952298
    profeddieb
    Participant

    OK – first I feel like an idiot, as it was that my function(s).php was missing the the s. Hate those minor errors. I always forget to check the simplest thing first. Thank you!

    Now, the filter is working. However, I am encountering another problem. It has to do with linking. With the filter on, the URL to the item: /company/companyName/ and when you view the item, the page comes up 404. But it will come up at the OLD url listed /organizer/companyName

    add_filter('tribe_organizer_label_singular', 'change_single_organizer_label' );
    function change_single_organizer_label() {
        return 'Company';
    }
      
    add_filter('tribe_organizer_label_plural', 'change_plural_organizer_label' );
    function change_plural_organizer_label() {
        return 'Companies';
    }

    The issue becomes, any link to the organizer page, does not work.

    #952826
    George
    Participant

    Sorry you’ve run into that additional problem there – I’m curious, if you make the label change and then head to Settings > Permalinks in your admin, and just click “Save Changes” without actually changing, do the links behave any better?

    This trick will cause the permalink structure to refresh across your site, which might help with this issue you noticed with organizer URLs.

    Let us know if it does!
    George

    #952831
    profeddieb
    Participant

    That is exactly what I did yesterday and it cleared up. All is working well now. Sorry, I should have updated this.

    Thanks again for your help. Still can’t believe I missed the (s) on functions.php, First thing I should have checked.

    #952835
    George
    Participant

    No worries about the functions.php thing, stuff like that is hard to catch!

    I’m glad things cleared up, best of luck with your project! 🙂

    — George

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Relabeling Organizer label’ is closed to new replies.