Home › Forums › Calendar Products › Events Calendar PRO › Relabeling Organizer label
- This topic has 5 replies, 2 voices, and was last updated 11 years, 1 month ago by
George.
-
AuthorPosts
-
March 29, 2015 at 6:53 pm #951750
profeddieb
ParticipantI 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.
March 29, 2015 at 7:24 pm #951761George
ParticipantHey 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!
GeorgeMarch 31, 2015 at 10:54 am #952298profeddieb
ParticipantOK – 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.
April 2, 2015 at 9:10 am #952826George
ParticipantSorry 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!
GeorgeApril 2, 2015 at 9:31 am #952831profeddieb
ParticipantThat 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.
April 2, 2015 at 9:38 am #952835George
ParticipantNo 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
-
AuthorPosts
- The topic ‘Relabeling Organizer label’ is closed to new replies.
