{"id":1896512,"date":"2019-10-18T13:19:19","date_gmt":"2019-10-18T17:19:19","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/adding-custom-css-to-community-events-pages-2\/"},"modified":"2026-04-09T15:05:40","modified_gmt":"2026-04-09T19:05:40","slug":"customizing-community-events-submission-form","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/customizing-community-events-submission-form\/","title":{"rendered":"Customizing the Community Event Submission Form"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h-customizing-styles-with-css-and-php\">Customizing Styles with CSS and PHP<\/h2>\n\n\n\n<p>Sometimes the default styling of Community Events needs to be customized to fit a particular theme. There are two main methods for writing CSS that only targets Community Events pages: using CSS only, or using a combination of CSS and PHP.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"body-class\">CSS Only: Body Classes<\/h4>\n\n\n\n<p>Any correctly-made WordPress theme will make use of the WordPress Core function <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/body_class\/\" target=\"_blank\" rel=\"noopener noreferrer\">body_class()<\/a>, which allows plugins and themes to add custom CSS classes to the HTML body tag.<\/p>\n\n\n\n<p>Community Events adds the following class names to the body of Community Events pages:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>.tribe_community_edit<\/code>: This class is only used on Community Events submission pages.<\/li>\n\n\n\n<li><code>.tribe_community_list<\/code>: This class is only used on Community Events &#8220;My Events&#8221; pages.<\/li>\n<\/ul>\n\n\n\n<p>\u261d\ufe0f For a quick example of using these classes effectively, here&#8217;s a bit of example code that would make the Event Title label text on the Community Events submission form red:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><pre class=\"brush: css; title: ; notranslate\" title=\"\">body.tribe_community_edit .events-community-post-title label {\n  color: red;\n}<\/pre><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"template-tags\">CSS and PHP: Template Tags<\/h4>\n\n\n\n<p>The above method \u2014 using HTML body classes \u2014 allows you to easily write custom CSS for Community Events pages with just CSS. No PHP is required.<\/p>\n\n\n\n<p>You could use PHP to print CSS directly onto Community Events pages, though. There are a number of reasons why one might want to do this, and these same methods could be used to print JavaScript onto Community Events pages, too, so they&#8217;re worth describing.<\/p>\n\n\n\n<p>The two main template tags you&#8217;ll want to be aware of in this sort of situation are as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>tribe_is_community_edit_event_page()<\/code>: Returns true only if the Community Events submission page is currently being viewed.<\/li>\n\n\n\n<li><code>tribe_is_community_my_events_page()<\/code>: Returns true only if the Community Events &#8220;My Events&#8221; page is currently being viewed.<\/li>\n<\/ul>\n\n\n\n<p>You could use these template tags to print CSS or JavaScript onto Community Events pages with a PHP snippet like the following, which hooks into WordPress&#8217; <a href=\"https:\/\/codex.wordpress.org\/Plugin_API\/Action_Reference\/wp_head\" target=\"_blank\" rel=\"noopener noreferrer\">wp_head action<\/a> to print CSS if you&#8217;re on either the submission page or the &#8220;My Events&#8221; list page.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n\/**\n * Adds CSS or JS to the top of Community Events&#039; submission and &quot;My Events&quot; pages.\n *\/\nfunction teckb_events_community_css() {\n \n  if ( ! tribe_is_community_edit_event_page() &amp;&amp; ! tribe_is_community_my_events_page() ) {\n    return;\n  }\n?&gt;\n\n&lt;style&gt;\n.insert-your-custom-css-here {\n    background: black;\n    color: blue;\n}\n&lt;\/style&gt;\n\n&lt;script&gt;\nconsole.log( &#039;You can also insert JavaScript, although this may be best in the wp_footer hook&#039; );\n&lt;\/script&gt;\n\n&lt;?php\n}\n \nadd_action( &#039;wp_head&#039;, &#039;teckb_events_community_css&#039; );\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-make-form-fields-required\">Make Form Fields Required<\/h2>\n\n\n\n<p class=\"has-background\" style=\"background-color:var(--global-palette8)\">This tutorial is only suggested as a starting place. You&#8217;ll need to customize the code examples for your own specific needs.<\/p>\n\n\n\n<p>By default, only the <em>Event Title<\/em> and <em>Event Description<\/em> fields are required on the Community Events submission form. But you can use plugin filters to modify what fields are required and\/or what error messages display when a required field hasn&#8217;t been filled out by the submitter.<\/p>\n\n\n\n<p>You can specify event fields for requirement by using this filter: <kbd>tribe_events_community_required_fields<\/kbd><\/p>\n\n\n\n<p>To make the Event URL field required for submission, for example, you could add the following snippet of code to your site:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; quick-code: false; notranslate\" title=\"\">\nadd_filter( 'tribe_events_community_required_fields', 'my_community_required_fields', 10, 1 );\n\nfunction my_community_required_fields( $fields ) {\n\n  if ( ! is_array( $fields ) ) {\n    return $fields;\n  }\n\n  $fields&#x5B;] = 'EventURL';\n\n  return $fields;\n}\n<\/pre><\/div>\n\n\n<p>The <code>(required)<\/code> label should automatically be added after the field label, if the field is required.<\/p>\n\n\n\n<p>You can see a full list of the default fields below. It&#8217;s worth mentioning that there are also two &#8220;shortcut&#8221; fields you can specify for the <kbd>tribe_events_community_required_fields<\/kbd> filter: <kbd>venue<\/kbd> and <kbd>organizer<\/kbd>. These two shortcuts make the entire venue section or organizer section required, respectively. If either is added via the <kbd>tribe_events_community_required_fields<\/kbd> filter, then the user has to pick an existing venue or organizer option <strong>or<\/strong> create a new one\u2014the venue or organizer can&#8217;t be left.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"default\">Default Event Fields<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><kbd>post_content<\/kbd><\/li>\n\n\n\n<li><kbd>event_image<\/kbd><\/li>\n\n\n\n<li><kbd>EventStartDate<\/kbd><\/li>\n\n\n\n<li><kbd>EventStartHour<\/kbd><\/li>\n\n\n\n<li><kbd>EventStartMinute<\/kbd><\/li>\n\n\n\n<li><kbd>EventStartMeridian<\/kbd><\/li>\n\n\n\n<li><kbd>EventEndDate<\/kbd><\/li>\n\n\n\n<li><kbd>EventEndMinute<\/kbd><\/li>\n\n\n\n<li><kbd>EventEndHour<\/kbd><\/li>\n\n\n\n<li><kbd>EventEndMeridian<\/kbd><\/li>\n\n\n\n<li><kbd>is_recurring<\/kbd><\/li>\n\n\n\n<li><kbd>EventCurrencySymbol<\/kbd><\/li>\n\n\n\n<li><kbd>tax_input.tribe_events_cat<\/kbd> <em>(for event categories)<\/em><\/li>\n\n\n\n<li><kbd>venue<\/kbd><\/li>\n\n\n\n<li><kbd>organizer<\/kbd><\/li>\n\n\n\n<li><kbd>EventShowMapLink<\/kbd><\/li>\n\n\n\n<li><kbd>EventURL<\/kbd><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-venue-fields\">Venue Fields<\/h3>\n\n\n\n<p>You can specify venue fields for requirement by using this filter:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><kbd>tribe_events_community_required_venue_fields<\/kbd><\/li>\n<\/ul>\n\n\n\n<p>To make the venue URL and phone number required, for example, you could write the following snippet:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( 'tribe_events_community_required_venue_fields', 'my_venue_community_required_fields' );\n\nfunction my_venue_community_required_fields( $fields ) {\n    \n  if ( ! is_array( $fields ) ) {\n    return $fields;\n  }\n\n  $fields&#x5B;] = 'Phone';\n  $fields&#x5B;] = 'URL';\n\n  return $fields;\n}\n<\/pre><\/div>\n\n\n<p>In order for the above snippet to work, it is necessary to also require the venue field itself. You can do that with the following snippet:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( 'tribe_events_community_required_fields', 'my_community_required_fields' );\n \nfunction my_community_required_fields( $fields ) {\n \n  if ( ! is_array( $fields ) ) {\n    return $fields;\n  }\n \n  $fields&#x5B;] = 'venue';\n \n  return $fields;\n}\n<\/pre><\/div>\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h4 class=\"wp-block-heading\" id=\"h-default-venue-fields\">Default Venue Fields<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><kbd>Venue<\/kbd> <em>(the Venue Name)<\/em><\/li>\n\n\n\n<li><kbd>Address<\/kbd><\/li>\n\n\n\n<li><kbd>City<\/kbd><\/li>\n\n\n\n<li><kbd>Province<\/kbd><\/li>\n\n\n\n<li><kbd>State<\/kbd><\/li>\n\n\n\n<li><kbd>Zip<\/kbd><\/li>\n\n\n\n<li><kbd>Phone<\/kbd><\/li>\n\n\n\n<li><kbd>URL<\/kbd><\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"organizer-fields\">Organizer Fields<\/h3>\n\n\n\n<p>You can specify organizer fields for requirement by using this filter:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><kbd>tribe_events_community_required_organizer_fields<\/kbd><\/li>\n<\/ul>\n\n\n\n<p>To make the organizer email address required, for example, you could write the following snippet:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( 'tribe_events_community_required_organizer_fields', 'my_organizer_community_required_fields' );\n\nfunction my_organizer_community_required_fields( $fields ) {\n    \n  if ( ! is_array( $fields ) ) {\n    return $fields;\n  }\n\n  $fields&#x5B;] = 'Email';\n\n  return $fields;\n} \n<\/pre><\/div>\n\n\n<p>In order for the above snippet to work, it is necessary to also require the organize field itself. You can do that with the following snippet:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( 'tribe_events_community_required_fields', 'my_community_required_fields' );\n \nfunction my_community_required_fields( $fields ) {\n \n  if ( ! is_array( $fields ) ) {\n    return $fields;\n  }\n \n  $fields&#x5B;] = 'organizer';\n \n  return $fields;\n}\n<\/pre><\/div>\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h4 class=\"wp-block-heading\" id=\"organizer\">Default Organizer Fields<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><kbd>Organizer<\/kbd> (the organizer name)<\/li>\n\n\n\n<li><kbd>Phone<\/kbd><\/li>\n\n\n\n<li><kbd>Website<\/kbd><\/li>\n\n\n\n<li><kbd>Email<\/kbd><\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-additional-fields\">Additional Fields<\/h3>\n\n\n\n<p>If you are using <strong>Events Calendar Pro<\/strong> along with The Events Calendar, then you can make use of the <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/k\/pro-additional-fields\/\">Additional Fields<\/a> feature to collect extra information for Events. You can make any additional field a required field by using the following example snippet.<\/p>\n\n\n\n<p>Note: you will need to get the names (e.g. <code>_ecp_custom_2<\/code>) of the fields after setting them up and change them in the code.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( 'tribe_events_community_required_fields', 'my_community_required_fields' );\n\nfunction my_community_required_fields( $fields ) {\n  if ( ! is_array( $fields ) ) {\n    return $fields;\n  }\n  $fields&#x5B;] = '_ecp_custom_2'; \/\/ this is the field name for the input you want to require\n  $fields&#x5B;] = '_ecp_custom_3'; \/\/ this is another input you wish to require\n  return $fields;\n}\n<\/pre><\/div>\n\n\n<p>The &#8220;required&#8221; label will not show up automatically for Additional Fields. You can fix that with the following sample snippet:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( &#039;tribe_community_events_field_label_text&#039;, &#039;tec_additional_fields_required_labels&#039;, 10, 2 );\n\nfunction tec_additional_fields_required_labels( $text, $field ) {\n  \/\/ Bail, if it&#039;s not the Additional Field.\n\tif ( ! strstr( $field, &#039;_ecp_custom_2&#039; ) ) {\n\t\treturn $text;\n\t}\n\n  \/\/ Add the &quot;required&quot; label.\n\treturn $text . &#039; &lt;span class=&quot;req&quot;&gt;(required)&lt;\/span&gt;&#039;;\n}\n<\/pre><\/div>\n\n\n<p>The last step is to add the snippet that includes the custom field in the list of allowed fields.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( 'tec_events_community_allowed_fields', 'my_community_allowed_fields' );\n \nfunction my_community_allowed_fields( $fields ) {\n  if ( ! is_array( $fields ) ) {\n    return $fields;\n  }\n  $fields&#x5B;] = '_ecp_custom_2';\n  return $fields;\n}\n<\/pre><\/div>\n\n\n<p>\u261d\ufe0f Note: Make sure to change <strong>_ecp_custom_2&nbsp;<\/strong>to a field <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2019\/10\/ECP-custom-1-1024x193.png\" alt=\"This image has an empty alt attribute; its file name is ECP-custom-1-1024x193.png\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"errors\">Customize the &#8220;(required)&#8221; Label<\/h3>\n\n\n\n<p>Customizing the label is also possible through a filter. See the below example, which changes the label to &#8220;must be filled&#8221;.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( &#039;tribe_community_required_field_marker&#039;, &#039;tec_ce_custom_required_label&#039;, 10, 2 );\n\nfunction tec_ce_custom_required_label ( $html, $field ) {\n\t$html = &#039; &lt;span class=&quot;req&quot;&gt;&#039; . &#039;(must be filled)&#039; . &#039;&lt;\/span&gt;&#039;;\n\n\treturn $html;\n}\n<\/pre><\/div>\n\n\n<p>It is possible to customize the label for certain fields only. For that you can use the <code>$field<\/code> parameter that is being passed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-custom-error-messages\">Custom Error Messages<\/h3>\n\n\n\n<p>First, let&#8217;s understand where these error messages are coming from. If you go to your Event Submission page and try to submit an event without a title and description, you can use <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/using-google-chrome-developer-tools\/\">Chrome Dev Tools<\/a> to inspect the page and use the console to enter <code>tribe_submit_form_i18n<\/code> . This will show the object <code>errors<\/code> where all the errors are stored. They all have <code>key-value<\/code> pair &#8211; in this case the <code>key<\/code> is the label for the field and the <code>value<\/code> is the error message to be output.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"365\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.21.41@2x-1024x365.png\" alt=\"\" class=\"wp-image-1963470\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.21.41@2x-1024x365.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.21.41@2x-300x107.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.21.41@2x-768x274.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.21.41@2x-1536x547.png 1536w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.21.41@2x-2048x729.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Since these errors are added through a script, we can use a snippet that modifies the script to update error messages:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_action( 'wp_enqueue_scripts', function ( ) {\n\/\/ Ensure the script is enqueued\n\twp_enqueue_script( 'tribe_events-community' );\n\n\/\/ Modify the localization data\n\twp_add_inline_script( 'tribe_events-community', '\n        if ( tribe_submit_form_i18n.errors&#x5B; \"post_title\" ] ) { \/\/ Tweak to match which field you want to change\n        tribe_submit_form_i18n.errors&#x5B; \"post_title\" ] = \"You cannot submit an event without a title\"; \/\/ Tweak to match what message you want to output\n        }\n    ', 'before' );\n}, 20 );\n<\/pre><\/div>\n\n\n<p>Here is how that would affect the frontend: <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"363\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.30.15@2x-1024x363.png\" alt=\"\" class=\"wp-image-1963471\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.30.15@2x-1024x363.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.30.15@2x-300x106.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.30.15@2x-768x272.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.30.15@2x-1536x545.png 1536w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.30.15@2x-2048x726.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Let&#8217;s add to the Event Description to the same example:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_action( 'wp_enqueue_scripts', function ( ) {\n\t\t\/\/ Ensure the script is enqueued.\n\t\twp_enqueue_script( 'tribe_events-community' );\n\n\t\t\/\/ Modify the localization data.\n\t\twp_add_inline_script(\n\t\t\t'tribe_events-community',\n\t\t\t'if ( tribe_submit_form_i18n.errors&#x5B;\"post_title\"] ) { \n        tribe_submit_form_i18n.errors&#x5B; \"post_title\" ] = \"You cannot submit an event without a title\"; \n        }\n        if ( tribe_submit_form_i18n.errors&#x5B; \"tcepostcontent\" ] ) { \n        tribe_submit_form_i18n.errors&#x5B; \"tcepostcontent\" ] = \"Please add an event description \ud83d\ude48\"; \n        }',\n\t\t\t'before' \n\t\t);\n\t}\n);\n<\/pre><\/div>\n\n\n<p>And here is how that would affect the frontend: <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"443\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.38.30@2x-1024x443.png\" alt=\"\" class=\"wp-image-1963472\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.38.30@2x-1024x443.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.38.30@2x-300x130.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.38.30@2x-768x333.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.38.30@2x-1536x665.png 1536w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CleanShot-2024-11-22-at-16.38.30@2x-2048x887.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-custom-errors-for-custom-fields\">Custom Errors for Custom Fields<\/h4>\n\n\n\n<p>In the case where you have set up requiring fields other than the default, it is still possible to tweak the error message(s). For this example, these are the Additional Fields we will be requiring and altering the error message:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"641\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.20.31@2x-1024x641.png\" alt=\"\" class=\"wp-image-1963613\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.20.31@2x-1024x641.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.20.31@2x-300x188.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.20.31@2x-768x481.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.20.31@2x-1536x962.png 1536w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.20.31@2x-2048x1282.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Here&#8217;s an example using the required addition fields from above:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nfunction my_community_required_fields( $fields ) {\n\tif ( ! is_array( $fields ) ) {\n\t\treturn $fields;\n\t}\n\t$fields&#x5B;] = &#039;_ecp_custom_2&#039;; \n\t$fields&#x5B;] = &#039;_ecp_custom_3&#039;; \n\t$fields&#x5B;] = &#039;_ecp_custom_5&#039;;\n\treturn $fields;\n}\n\nadd_filter( &#039;tec_events_community_allowed_fields&#039;, &#039;my_community_allowed_fields&#039; );\n\nfunction my_community_allowed_fields( $fields ) {\n\tif ( ! is_array( $fields ) ) {\n\t\treturn $fields;\n\t}\n\t$fields&#x5B;] = &#039;_ecp_custom_2&#039;; \n\t$fields&#x5B;] = &#039;_ecp_custom_3&#039;; \n\t$fields&#x5B;] = &#039;_ecp_custom_5&#039;;\n\treturn $fields;\n}\n\nadd_filter( &#039;tribe_community_events_field_label_text&#039;, &#039;tec_additional_fields_required_labels&#039;, 10, 2 );\n\nfunction tec_additional_fields_required_labels( $text, $field ) {\n\t\/\/ Add required label if it is one of the Additional Fields.\n\tif ( strstr( $field, &#039;_ecp_custom_2&#039;) ) {\n\t\treturn $text . &#039; &lt;span class=&quot;req&quot;&gt;(required)&lt;\/span&gt;&#039;;\n\t}\n\tif ( strstr( $field, &#039;_ecp_custom_3&#039;) ) {\n\t\treturn $text . &#039; &lt;span class=&quot;req&quot;&gt;(required)&lt;\/span&gt;&#039;;\n\t}\n\tif ( strstr( $field, &#039;_ecp_custom_5&#039;) ) {\n\t\treturn $text . &#039; &lt;span class=&quot;req&quot;&gt;(required)&lt;\/span&gt;&#039;;\n\t}\n\n    \/\/ If it&#039;s not one of the Additional Fields we require, just return the label\n    return $text;\n}\n<\/pre><\/div>\n\n\n<p>Without adding our snippet to change the error messages, this is what will now show when these required fields are empty and someone tries to submit the event: <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"393\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.30.47@2x-1024x393.png\" alt=\"\" class=\"wp-image-1963615\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.30.47@2x-1024x393.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.30.47@2x-300x115.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.30.47@2x-768x295.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.30.47@2x-1536x590.png 1536w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.30.47@2x-2048x787.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>To enhance the clarity of your error messages by pinpointing the required fields, you can integrate the following code snippet into your site:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php \/\/Do not copy this line\n\nadd_filter( &#039;tribe_community_form_field_label&#039;, function ( $label, $field ) {\n\t\/\/ Check if the field does not match &#039;_ecp_custom_X&#039; pattern\n\tif ( ! preg_match( &#039;\/^_ecp_custom_\\d+$\/&#039;, $field ) || ! tribe_is_community_edit_event_page() ) {\n\t\treturn $label;\n\t}\n\n\t$custom_fields = tribe_get_option( &#039;custom-fields&#039;, array() );\n\n\tforeach ( $custom_fields as $custom_field ) {\n\t\tif ( in_array( $field, $custom_field ) ) {\n\t\t\t$label = $custom_field&#x5B;&#039;label&#039;];\n\t\t}\n\t}\n\n\treturn $label;\n}, 10, 2 );\n<\/pre><\/div>\n\n\n<p>With the snippet added, the error message will change from &#8220;Ecp custom 2 is required&#8221; to &#8220;Additional Field is required,&#8221; as the snippet replaces the field key (_ecp_custom_2) with the field label.<\/p>\n\n\n\n<p>Another approach is to customize the error message completely; however, this works only for fields that don&#8217;t require a page reload. This is the snippet that we can add to adjust those error messages:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_action(\n\t'wp_enqueue_scripts',\n\tfunction ( ) {\n\t\t\/\/ Ensure the script is enqueued.\n\t\twp_enqueue_script( 'tribe_events-community' );\n\n\t\t\/\/ Modify the localization data.\n\t\twp_add_inline_script(\n\t\t\t'tribe_events-community',\n\t\t\t'if ( tribe_submit_form_i18n.errors&#x5B; \"_ecp_custom_2\" ] ) { \n        tribe_submit_form_i18n.errors&#x5B; \"_ecp_custom_2\" ] = \"This is a custom field... Do not skip it!\"; \n        }\n        if (tribe_submit_form_i18n.errors&#x5B; \"_ecp_custom_3\" ] ) { \n        tribe_submit_form_i18n.errors&#x5B; \"_ecp_custom_3\" ] = \"Seriously?! You\\'re skipping this one too?\"; \n        }\n        if (tribe_submit_form_i18n.errors&#x5B; \"_ecp_custom_5\" ] ) { \n        tribe_submit_form_i18n.errors&#x5B; \"_ecp_custom_5\" ] = \"I\\'m calling your manager.\"; \n        }',\n\t\t\t'before'\n\t\t);\n\t}\n);\n<\/pre><\/div>\n\n\n<p>And here is how that snippet will change those error messages: <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"348\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.33.33@2x-1024x348.png\" alt=\"\" class=\"wp-image-1963616\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.33.33@2x-1024x348.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.33.33@2x-300x102.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.33.33@2x-768x261.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.33.33@2x-1536x522.png 1536w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/12\/CleanShot-2024-12-03-at-17.33.33@2x-2048x696.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>You should tweak that snippet to match the additional field you want to change and adjust the error message(s) to be how you want them to show on your site.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-remove-fields-from-the-submission-form-0\">Remove Fields from the Submission Form<\/h2>\n\n\n\n<p>The <code>tec_events_community_form_layout<\/code> filter hook is a powerful tool that controls the layout and available fields in the submission form. Using this filter hook, you can customize the form to suit your specific needs.<\/p>\n\n\n\n<p>The following code allows you to easily modify the list of fields to remove by editing the <code>$fields_to_remove<\/code> array.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( 'tec_events_community_form_layout', function ( $fields ) {\n\n\t\/\/ Define the fields\/modules you want to remove\n\t$fields_to_remove = &#x5B;\n\t\t'image',                    \/\/ Event Image\n\t\t'event-taxonomy_event',     \/\/ Event Categories\n\t\t'event-taxonomy_tag',       \/\/ Event Tags\n\t\t'event-cost',               \/\/ Event Cost\n\t\t'terms',                    \/\/ Terms and Conditions\n\t];\n\n\t\/\/ Remove the specified fields\/modules\n\treturn array_diff_key( $fields, array_flip( $fields_to_remove ) );\n\n}, 20 );\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"h-removable-submission-form-fields-0\">Removable Submission Form Fields<\/h4>\n\n\n\n<p>Below is a list of fields available in the Community events submission form that you can control with the <code>tec_events_community_form_layout<\/code> filter hook:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Field Key<\/strong><\/th><th><strong>Description<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>title<\/code><\/td><td>Event Title<\/td><\/tr><tr><td><code>description<\/code><\/td><td>Event Description<\/td><\/tr><tr><td><code>event-datepickers<\/code><\/td><td>Event Date &amp; Time Pickers<\/td><\/tr><tr><td><code>image<\/code><\/td><td>Event Image<\/td><\/tr><tr><td><code>event-taxonomy_event<\/code><\/td><td>Event Categories<\/td><\/tr><tr><td><code>event-taxonomy_tag<\/code><\/td><td>Event Tags<\/td><\/tr><tr><td><code>event-venue<\/code><\/td><td>Event Venue<\/td><\/tr><tr><td><code>event-organizer<\/code><\/td><td>Event Organizer<\/td><\/tr><tr><td><code>event-website<\/code><\/td><td>Event Website URL<\/td><\/tr><tr><td><code>event-series<\/code><\/td><td>Event Series<\/td><\/tr><tr><td><code>event-custom<\/code><\/td><td>Custom Fields<\/td><\/tr><tr><td><code>event-cost<\/code><\/td><td>Event Cost<\/td><\/tr><tr><td><code>spam-control<\/code><\/td><td>Spam Control (reCAPTCHA or similar)<\/td><\/tr><tr><td><code>terms<\/code><\/td><td>Terms and Conditions Acceptance<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-remove-the-event-status-field-0\">Remove the Event Status Field<\/h4>\n\n\n\n<p>The <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/adding-a-custom-event-status\/\" target=\"_blank\" rel=\"noreferrer noopener\">Event Status<\/a> field allows users to set the status of an event (e.g., Postponed or Moved Online). To remove this field from the submission form, use the following code:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( 'tribe_community_events_event_status_enabled', '__return_false' );\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"h-remove-virtual-event-field-0\">Remove Virtual Event Field<\/h4>\n\n\n\n<p>If you do not want users to leverage the <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/creating-online-events\/\" target=\"_blank\" rel=\"noreferrer noopener\">virtual events<\/a> functionality, you can disable this field with the following code:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( 'tribe_community_events_virtual_events_integration_enabled', '__return_false' );\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-exclude-specific-event-categories-amp-tags-from-form\">Exclude Specific Event Categories &amp; Tags from Form<\/h2>\n\n\n\n<p>You might want to prevent users from selecting specific categories or tags when submitting an event. This is useful for hiding internal-use-only categories or tags that shouldn&#8217;t be publicly visible. This guide shows you how to use a single code snippet to hide both event categories and event tags from the submission form dropdowns.<\/p>\n\n\n\n<p>The following code uses the <code>tribe_dropdown_search_terms<\/code> filter, which specifically targets the AJAX-powered dropdowns in The Events Calendar. By using this filter, you can control what options are available to event submitters, keeping internal or restricted terms hidden from view. <br><br>The snippet allows you to define the IDs for categories and tags you wish to exclude.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n\nadd_filter(\n    &#039;tribe_dropdown_search_terms&#039;,\n    function( $data, $search, $page, $args, $source ) {\n\n        $taxonomy = $args&#x5B;&#039;taxonomy&#039;];\n\n        \/\/ IDs to exclude\n        $exclude_map = &#x5B;\n            &#039;tribe_events_cat&#039; =&gt; &#x5B; 1, 2, 3, 4, 5 ], \/\/ Event category IDs\n            &#039;post_tag&#039;         =&gt; &#x5B; 6, 7 ],       \/\/ Event tag IDs\n        ];\n\n        if ( ! isset( $exclude_map&#x5B; $taxonomy ] ) ) {\n            return tribe( &#039;ajax.dropdown&#039; )-&gt;search_terms( $search, $page, $args, $source );\n        }\n\n        $exclude_ids = $exclude_map&#x5B; $taxonomy ];\n\n        $args&#x5B;&#039;exclude&#039;] = isset( $args&#x5B;&#039;exclude&#039;] )\n            ? (array) $args&#x5B;&#039;exclude&#039;]\n            : &#x5B;];\n\n        $args&#x5B;&#039;exclude&#039;] = array_unique(\n            array_merge(\n                array_map( &#039;intval&#039;, $args&#x5B;&#039;exclude&#039;] ),\n                $exclude_ids\n            )\n        );\n\n        \/\/ Return modified dropdown search terms\n        return tribe( &#039;ajax.dropdown&#039; )-&gt;search_terms( $search, $page, $args, $source );\n    },\n    10,\n    5\n);\n\n<\/pre><\/div>\n\n\n<p><strong>Note: <\/strong>You can exclude only one of these (category or tag) by tweaking the code. For example, if you want to only exclude categories, you can remove this line of code, so tags aren&#8217;t affected <code>'post_tag' =&gt; [ 6, 7 ], \/\/ Event tag IDs<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-how-to-find-ids\">How to Find IDs<\/h4>\n\n\n\n<p>To find the ID of any category or tag:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In your WordPress dashboard, navigate to <strong>Events &gt; Event Categories<\/strong> or <strong>Events &gt; Tags<\/strong>.<br><\/li>\n\n\n\n<li>Hover your mouse over the name of the term you want to find the ID for. The <code>tag_ID<\/code> in the URL is the ID, as shown below:<br><\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"537\" height=\"36\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/06\/2025-06-26_20-36.png\" alt=\"\" class=\"wp-image-1965712\" style=\"border-width:1px\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/06\/2025-06-26_20-36.png 537w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/06\/2025-06-26_20-36-300x20.png 300w\" sizes=\"auto, (max-width: 537px) 100vw, 537px\" \/><\/figure><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"h-how-to-use-the-code\">How to Use the Code<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Find the IDs<\/strong> of the categories and tags you want to hide.<\/li>\n\n\n\n<li>Add the snippet to your site&#8217;s <strong><code>functions.php<\/code><\/strong> file or use a code snippet plugin.<\/li>\n\n\n\n<li><strong>Replace the placeholder IDs<\/strong> (e.g. 1,2,3,4,5,6,7) in the snippet with your own. You can add as many IDs as you need, separated by commas. The <strong><code>'tribe_events_cat'<\/code><\/strong> array should contain your <strong>event category IDs<\/strong>. The <strong><code>'post_tag'<\/code><\/strong> array should contain your <strong>event tag IDs<\/strong>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-modify-the-successful-submission-message\"> Modify the Successful Submission Message<\/h2>\n\n\n\n<p>To change the message that appears after successfully creating a new event with the Events Community &#8220;add event&#8221;, you can add the following PHP code snippet to your site:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( &#039;tribe_community_events_form_errors&#039;, function ( $errors ) { \n    if ( empty( $errors ) ) { \n        return $errors; \n    } \n\n    return array_map( function ( $error ) { \n        if ( isset( $error&#x5B;&#039;type&#039;] ) &amp;&amp; $error&#x5B;&#039;type&#039;] === &#039;success&#039; ) { \n            $error&#x5B;&#039;message&#039;] = &#039;&lt;p&gt;Event Submitted.&lt;\/p&gt;&lt;p&gt;Submitted events are published after review.&lt;\/p&gt;&#039;; \n        } \n\n        return $error; \n    }, $errors ); \n} );\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-limit-the-file-size-upload\">Limit the File Size Upload<\/h2>\n\n\n\n<p>To change the file size upload, simply add the following snippet to your theme&#8217;s <strong>functions.php<\/strong> file or via <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\">Code Snippets<\/a> plugin:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( 'tribe_community_events_max_file_size_allowed', function() {\n    return 1048576; \/\/ 1MB\n} );\n<\/pre><\/div>\n\n\n<p>This will display both the file size restriction label and the corresponding error message upon submission, as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"305\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/09\/Limit-Upload-Size-1024x305.png\" alt=\"\" class=\"wp-image-1962994\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/09\/Limit-Upload-Size-1024x305.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/09\/Limit-Upload-Size-300x89.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/09\/Limit-Upload-Size-768x229.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/09\/Limit-Upload-Size.png 1111w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"109\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/09\/Error-Msg-1024x109.png\" alt=\"\" class=\"wp-image-1962995\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/09\/Error-Msg-1024x109.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/09\/Error-Msg-300x32.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/09\/Error-Msg-768x82.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/09\/Error-Msg.png 1205w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><br>You can alter the number after the &#8220;return&#8221; portion of the snippet to customize the file size upload. The above option will give you a file size of 1MB.<\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:var(--global-palette8)\"><strong>Note:<\/strong> This snippet can be overridden by your server settings. &nbsp;If your server has a more restrictive setting, this will NOT override that. For example, if your server is already set to a max size of 1MB and you try to change it to 2MB, your server may block this from occurring.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-allow-webp-image-uploads\">Allow WebP Image Uploads<\/h2>\n\n\n\n<p>By default, the Community submission form allows to upload images in the following formats:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>GIF (<code>image\/gif<\/code>)<\/li>\n\n\n\n<li>JPEG (<code>image\/jpeg<\/code>)<\/li>\n\n\n\n<li>PNG (<code>image\/png<\/code>)<\/li>\n<\/ul>\n\n\n\n<p>If you&#8217;d like to also allow <strong>WebP<\/strong> image uploads, you can do so by using the <code>tec_events_community_image_mime_types<\/code> filter to extend the accepted MIME types.<\/p>\n\n\n\n<p>Add the following snippet to your theme\u2019s <code>functions.php<\/code> file or use a plugin like <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\" target=\"_blank\" rel=\"noreferrer noopener\">Code Snippets<\/a>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( 'tec_events_community_image_mime_types', function( $mime_types ) {\n    $mime_types&#x5B;] = 'image\/webp';\n    return $mime_types;\n} );\n<\/pre><\/div>\n\n\n<p>This snippet adds <code>image\/webp<\/code> to the list of MIME types accepted by the Community Events image uploader. This enables users to submit images in the WebP format, which offers better compression and smaller file sizes compared to JPEG and PNG.<\/p>\n\n\n\n<p>You may also want to update the image upload field text. The default image upload field text says:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>\u201cChoose a .jpg, .png, or .gif file under 300 MB in size.\u201d<\/em><\/p>\n<\/blockquote>\n\n\n\n<p>To reflect that WebP is also accepted, you\u2019ll need to <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/customizing-template-files-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">override the template<\/a> that outputs this text.<\/p>\n\n\n\n<p>Template to override: <code>\/wp-content\/plugins\/the-events-calendar-community-events\/src\/views\/community\/modules\/image.php<\/code><\/p>\n\n\n\n<p>Steps to override the template:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Copy that file to your theme:<br><code><code>\/wp-content\/themes\/your-theme\/tribe-events\/community\/modules\/image.php<\/code><\/code><\/li>\n\n\n\n<li>Open the file and edit the text on line 50 to include <em>.webp<\/em>.<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;p&gt;&lt;?php echo esc_html( sprintf( __( &#039;Choose a .jpg, .png, .gif or .webp file under %1$s in size.&#039;, &#039;tribe-events-community&#039; ), $size_format ) ); ?&gt;&lt;\/p&gt;\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-for-developers\">For Developers<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>tec_events_community_form_layout<\/li>\n\n\n\n<li><a href=\"https:\/\/docs.theeventscalendar.com\/reference\/hooks\/tribe_community_events_event_status_enabled\/\">tribe_community_events_event_status_enabled<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.theeventscalendar.com\/reference\/hooks\/tribe_community_events_virtual_events_integration_enabled\/\">tribe_community_events_virtual_events_integration_enabled<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Customizing Styles with CSS and PHP Sometimes the default styling of Community Events needs to be customized to fit a particular theme. There are two main methods for writing CSS that only targets Community Events pages: using CSS only, or using a combination of CSS and PHP. CSS Only: Body Classes Any correctly-made WordPress theme&#8230;<\/p>\n","protected":false},"author":84,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[116],"tags":[23,58],"stellar-product-taxonomy":[152],"class_list":["post-1896512","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-css-styling","tag-css","tag-php","stellar-product-taxonomy-community-events"],"acf":[],"taxonomy_info":{"category":[{"value":116,"label":"CSS &amp; Styling"}],"post_tag":[{"value":23,"label":"CSS"},{"value":58,"label":"PHP"}],"stellar-product-taxonomy":[{"value":152,"label":"Community"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"The Events Calendar Team","author_link":"https:\/\/theeventscalendar.com\/knowledgebase\/author\/the_events_calendar_team\/"},"comment_info":0,"category_info":[{"term_id":116,"name":"CSS &amp; Styling","slug":"css-styling","term_group":0,"term_taxonomy_id":116,"taxonomy":"category","description":"","parent":24,"count":40,"filter":"raw","term_order":"0","cat_ID":116,"category_count":40,"category_description":"","cat_name":"CSS &amp; Styling","category_nicename":"css-styling","category_parent":24}],"tag_info":[{"term_id":23,"name":"CSS","slug":"css","term_group":0,"term_taxonomy_id":23,"taxonomy":"post_tag","description":"","parent":20,"count":33,"filter":"raw","term_order":"0"},{"term_id":58,"name":"PHP","slug":"php","term_group":0,"term_taxonomy_id":58,"taxonomy":"post_tag","description":"","parent":20,"count":78,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/84"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1896512"}],"version-history":[{"count":8,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896512\/revisions"}],"predecessor-version":[{"id":1968727,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896512\/revisions\/1968727"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1896512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1896512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1896512"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1896512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}