Home › Forums › Calendar Products › Community Events › Removal of fields from "Add Event" page – on the front end and the back end…
- This topic has 10 replies, 2 voices, and was last updated 10 years, 5 months ago by
Geoff.
-
AuthorPosts
-
October 9, 2015 at 1:24 am #1013015
Marc de Villiers
GuestHi guys!
Please see topic: https://theeventscalendar.com/support/forums/topic/using-events-calendar-pro-and-community-events/#post-1007191
We’ve bought the Pro version and the Community Plugin for this site..
– How can we remove certain fields from the Add Event Page? We want our users to see just certain fields when adding an event, so that it doesn’t look like a generic system..
The fields we want to remove are:
Organizers (the whole section)
Tickets/Cost (the whole section)
Event Description
Event Website
Looking forward to your feedback!
October 9, 2015 at 1:39 am #1013017Marc de Villiers
GuestSorry, I also need to change the title of “Event Categories” on the input form as well as the event view page, to “Target Audience”
October 9, 2015 at 1:00 pm #1013255Geoff
MemberHi Marc! Welcome to the forums and thanks a TON for upgrading to PRO and Community. We’re stoked to have you aboard. 🙂
– How can we remove certain fields from the Add Event Page?
It will take a little bit of customization to get this going, but I’m happy to help point you in the right direction if I can.
That said, I think adding CSS to your theme’s style.css file is a good approach for hiding form fields. For example, this could hide those fields you mention:
#tribe-community-events #event_organizer, #tribe-community-events #event_cost, #tribe-community-events #event_website, .events-community-post-content { display: none; }Do note that the Event Description is a required field, so you will want to change that to a non-required field if you can, or else the event will never submit when entered. Here’s an article to get you started on that as well.
Will this help you get started? Please let me know.
Cheers!
GeoffOctober 15, 2015 at 3:11 am #1014791Marc de Villiers
GuestThanks Geoff!
Checking this out now.. much appreciated!
October 15, 2015 at 3:40 am #1014799Marc de Villiers
GuestSorry Geoff!
Just need a last few pointers..
We want to keep the “Event Description” after all, but hide:
Event Image (Hide on capture form and front end)
Under “Company Details” we want to hide:
Company Name:
Address:
Phone:
Website:
Show Google Maps Link:Speaker Details (Hide on capture form and front end)
Event Website (Hide on capture form and front end)
Event Cost (Hide on capture form and front end)
What would the CSS be to hide these but keep “Event Description” where it is..?
I ALSO need to add description text to the labels for:
Event Title: (required)
Event Description: (required).. to rather say
Event Title (eg. Diabetes Talk, Oncology Talk, etc.): (required)
Event Description (eg. Umhlanga, Cape Town South, etc.): (required)Looking forward to your feedback!
October 15, 2015 at 4:06 am #1014802Marc de Villiers
GuestOne last thing..
I need to change the title “Event Categories” to rather say “Target Audience”
– I’ve tried to do the change in the functions.php file:
add_filter(‘category_label_singular’, ‘change_single_category_label’ );
function change_single_category_label() {
return ‘Target_Audience’;
}add_filter(‘category_label_plural’, ‘change_plural_category_label’ );
function change_plural_category_label() {
return ‘Target_Audiences’;
}?>
.. but to no avail.. Is this a system filter? What would the correct commands be?
At the moment, the full functions.php text is:
<?php
//
// Recommended way to include parent theme styles.
// (Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
//
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
wp_enqueue_style( ‘child-style’,
get_stylesheet_directory_uri() . ‘/style.css’,
array(‘parent-style’)
);
}
//
// Your code goes below
//function remove_private_prefix($title) {
$title = str_replace(
‘Private:’,
”,
$title);
return $title;
}
add_filter(‘the_title’,’remove_private_prefix’);add_filter(‘tribe_organizer_label_singular’, ‘change_single_organizer_label’ );
function change_single_organizer_label() {
return ‘Speaker’;
}add_filter(‘tribe_organizer_label_plural’, ‘change_plural_organizer_label’ );
function change_plural_organizer_label() {
return ‘Speakers’;
}add_filter(‘category_label_singular’, ‘change_single_category_label’ );
function change_single_category_label() {
return ‘Target_Audience’;
}add_filter(‘category_label_plural’, ‘change_plural_category_label’ );
function change_plural_category_label() {
return ‘Target_Audiences’;
}?>
October 15, 2015 at 6:31 am #1014849Geoff
MemberHey Marc,
Awesome, I’m glad that first bit of CSS helped out!
We want to keep the “Event Description” after all, but hide…
You can still use the same CSS tactic to accomplish hiding other elements on the page as well. If you need help finding exactly which elements those are, here’s a great article on how to do that using DevTools in your browser.
I ALSO need to add description text to the labels for…
I think the text replacement method used in this Knowledgebase post will help out in this case.
I need to change the title “Event Categories” to rather say “Target Audience”
Give that last link I shared a try here as well. 🙂
Cheers!
GeoffOctober 19, 2015 at 5:31 am #1015768Marc
ParticipantHi Geoff!
Thanks so much for your help thus far..
I’m still stuck with something though..
I can’t seem to be able hide, eg. EVENT IMAGE
… without hiding:
Event Description: (required) along with it!
To clarify, we have decided we want to keep:
Event Description: (required)
…in place as it is useful to our users to view details of the event in the calendar view screen, but just rename the label to:
Event Location: (eg. Umhlanga, Cape Town South, etc.) (required)
What CSS would accomplish this for us, or is there another way to do this?
October 20, 2015 at 6:22 am #1016163Geoff
MemberHello Marc,
This should hide the event image section of the form:
#tribe-community-events #event_image_uploader {
display: none;
}Cheers!
GeoffOctober 23, 2015 at 2:06 am #1017189Marc
ParticipantHi Geoff!
It works! Thank you so much!
I’m still battling to change:
Event Description: (required)
to say:
Event Description (Eg: Pietermaritzburg, Durban, Eastern Cape): (required)
Sorry! I know I’m being dense here, but my programming skills are somewhat lacking in this area..
October 23, 2015 at 7:02 am #1017237Geoff
MemberHey there, Marc!
Awesome, I’m so glad that worked. 🙂
Shoot, I’m actually not aware of how to change the field labels without touching core code, which I really wouldn’t recommend. Sorry about that!
I’m going to go ahead and close this thread since we’ve gotten pretty past the subject of the original question. If you still have any questions, though, please do open up a new thread and we’d be happy to help you there as best we can.
Cheers!
Geoff -
AuthorPosts
- The topic ‘Removal of fields from "Add Event" page – on the front end and the back end…’ is closed to new replies.
