Additional fields only for admins

Home Forums Welcome! Pre-Sales Questions Additional fields only for admins

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1123043
    Andre
    Guest

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

    #1123059
    Geoff
    Member

    Hello 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!
    Geoff

    #1123079
    André
    Guest

    Hm, 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. 😉

    #1123335
    Geoff
    Member

    Another 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,
    Geoff

    #1123841
    Andre
    Guest

    Yeah, 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!!! 😉

    #1123843
    Andre
    Guest

    Sorry, the link above was incorrect. That one should work:

    calendar view i like - right below

    #1124038
    Geoff
    Member

    Hi 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!
    Geoff

    #1124311
    Andre
    Guest

    Geoff, thank you so much for your great support!!

    #1124448
    Geoff
    Member

    My pleasure! Thanks for reaching out and I hope you enjoy the plugins. 🙂

    Cheers,
    Geoff

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Additional fields only for admins’ is closed to new replies.