Home › Forums › Welcome! › Pre-Sales Questions › Additional fields only for admins
- This topic has 8 replies, 1 voice, and was last updated 9 years, 11 months ago by
Geoff.
-
AuthorPosts
-
June 6, 2016 at 9:00 am #1123043
Andre
GuestHi there,
I want to create a event calendar for the website of a musican.
The same calendar should be available for the musican herself and her staff with some additional informationan like “which musicans play on which event”, “fee that is agreed with the organizer” and so on…Is there a possibility to do that?
It would be a calendar where the additional fields are shown and one, where they are hidden.Thank you for your help.
Regards,
AndréJune 6, 2016 at 9:15 am #1123059Geoff
MemberHello André,
Good question. That definitely sounds possible. In fact, Events Calendar PRO includes functionality for creating custom fields for events.
However, I do want to note that whatever is filled in for the custom fields will be displayed on the website as well. If you want to hide that information from the website, then I would recommend doing so with CSS so that the information is contained in the event in the admin area, but not visible to the general population on your website.
Is that what you’re looking for? Please let me know. 🙂
Cheers!
GeoffJune 6, 2016 at 9:39 am #1123079André
GuestHm, that means there is a style that i can apply to the additional fields only? And in that style for instance the font size could be 0?
Is this the idea of the solution?Can the information then be seen in the source code? Its sensitive information that should really not be available for users. 😉
June 7, 2016 at 7:22 am #1123335Geoff
MemberAnother way to go about it would with a template override. We have step-by-step instructions for it in our Themer’s Guide, but it basically is a way of overriding any of the calendar’s view templates with your own markup.
So, for example, the template that contains the additional fields is located here:
/wp-content/events-calendar-pro/src/views/pro/modules/meta/additional-fields.php
From there:
- Make a copy of the file
- Make a new folder in your theme called tribe-events
- Make a new folder inside that one called pro
- Make a new folder inside that one called modules
- Make one last folder in that one called meta
- Drop the copied additional-fields.php file in that last folder
Now that the template is in your theme, you can modify it to suit your needs. In this case, you could either delete the additional fields markup so it disappears from the front-end view of the calendar, or add some condition (e.g. is_user_logged_in) logic to check if someone is logged in before displaying it.
Does that sound like a better approach to you? Please let me know. 🙂
Cheers,
GeoffJune 8, 2016 at 8:30 am #1123841Andre
GuestYeah, that’s what I need. You are great geoff!! Thanks
I’ll edit the template file, so that logged in users can see all information and the normal user cant see additional fields.
Is ist possible to view the calender for logged in users in the calendar view that is editable for them and for normal users in a widget view like on this picture https://theeventscalendar.com/product/wordpress-events-calendar-pro/
on the right side below the calendar??This would be one possibility. What’s important for me:
– Users should have a quick overview of the upcoming events where they can klick on for more information.
– 2-3 people that add the events to the calendar should be able to have a good overview over all the events in that month and should be able to surf through the year quickly. events, that arn’t fixed for 100% should be added but not yet be visible for normal users – only for logged in users.
– Actually we have 2 calendars – one that is the “tour plan” for the crew and one on the website for the people. goal: only one system 🙂Thank you for your great help!!! 😉
June 8, 2016 at 8:33 am #1123843Andre
GuestSorry, the link above was incorrect. That one should work:
June 8, 2016 at 11:21 am #1124038Geoff
MemberHi André, glad that helped!
I think all of that is doable and possibly even by using the same sort of logic I shared with the template override. I’m afraid that we’re fairly limited in how much support we can provide for custom development questions like this, but using the same is_user_logged_in() condition in your template overrides will allow you to selectively show and display the content you want people to view, whether they are logged in or not.
Cheers!
GeoffJune 8, 2016 at 11:59 pm #1124311Andre
GuestGeoff, thank you so much for your great support!!
June 9, 2016 at 7:10 am #1124448Geoff
MemberMy pleasure! Thanks for reaching out and I hope you enjoy the plugins. 🙂
Cheers,
Geoff -
AuthorPosts
- The topic ‘Additional fields only for admins’ is closed to new replies.
