Home › Forums › Calendar Products › Events Calendar PRO › Change Organizer Metadata
- This topic has 6 replies, 3 voices, and was last updated 10 years ago by
Support Droid.
-
AuthorPosts
-
March 21, 2016 at 2:59 pm #1092065
blankbeard
ParticipantI am needing to change the labels on the organizer metadata. Our organizers are only listing websites and social media. So I don’t need “Phone” or “Email” and want to add “Facebook”, “Twitter” and “Instagram”.
I was able to do it by changing the code (found and replaced “phone” with “Facebook”, not pretty but it worked) in the plugin but lost it when I updated. I want to figure out a cleaner way to do it and this time I will use the themers guide to be sure I save the changes come time for an update.
March 21, 2016 at 3:42 pm #1092088blankbeard
ParticipantAnd to be clear (for my previous post, which I never knew got a reply, Sorry!) this is not for the community events. This would be for the admin area and the labels when it displays on the organizer page and on single events. Thanks so much!
March 21, 2016 at 4:32 pm #1092105blankbeard
ParticipantI found what I needed to change in
src/views/modules/meta/organizer.php
src/admin-views/organizer-meta-box.php and
src/admin-views/new-organizer-meta-section.phpI guess my question is now. Do I copy those files into the /tribe-events folder I made in my theme folder and just make the changes there?
Also I would love to be able to make the changed labels (previously phone and email) clickable links, like the website label currently does. When I have that done I am going to want to replace the urls with labels like done Here
any nudges in the right direction are very appreciated.
March 22, 2016 at 7:49 am #1092320Josh
ParticipantHey Blankbeard,
Thanks for reaching out to us!
Looking at the files that you would like to customize, you could follow our Themer’s Guide to copy the src > views > modules > meta > organizer.php file into your theme and make the display changes that you would like there.
However, changing the field labels on the admin side would be a little bit trickier. You could try something like this example here for changing the word “events” to “concerts”. You could then add a conditional to limit both to the admin area (is_admin()) as well as the organizer post type ( ‘tribe_organizer’ == $current_screen->post_type ).
Let me know if this helps.
Thanks!
March 23, 2016 at 2:49 pm #1093151blankbeard
ParticipantWhen I copy the files to my theme in a folder called “tribe-events”, do I have to follow the folder structure?
would it be MyTheme/tribe-events/src/views/modules/meta/organizer.php or MyTheme/tribe-events/src/admin-views/organizer-meta-box.php ?Also what is it in the code that makes the input for “Website” display as a link? Is it easily applied to the other fields?
I was easily able to change it in the admin by editing the organizer-meta-box.php and new-organizer-meta-section.php in the admin-views folder in the plugin.
March 25, 2016 at 11:05 am #1094173Josh
ParticipantHey Blankbeard,
You would start following the folder structure after “views” folder. So, the path for your “organizer.php” file should be at MyTheme > tribe-events > modules > meta > organizer.php.
The link for the organizer website is built with the “tribe_get_organizer_website_url()” function. This happens to be a pluggable function, meaning you can recreate a new function in your theme with the same exact name (tribe_get_organizer_website_url) and add your output there.
Additionally, there is a filter here so you could also customize by taking advantage of the “tribe_get_organizer_website_url” filter.
You can find the code within the plugin at functions > template-tags > organizer.php
Let me know if this helps.
Thanks!
April 9, 2016 at 9:35 am #1100441Support 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 ‘Change Organizer Metadata’ is closed to new replies.
