Show all categories on add event form

Home Forums Calendar Products Community Events Show all categories on add event form

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1254264
    David
    Participant

    On the Submit an Event form, how can I force all categories to be displayed by default (currently shows 9 + a link to show all categories)?

    The solution from 2015 here no longer seems to work. https://theeventscalendar.com/support/forums/topic/show-all-categories-when-posting-a-new-event/

    #1254764
    Barry
    Member

    Hi David!

    A few things have changed since then and there is indeed an easier, safer way:

    function __return_1000() {
    	return 1000;
    }
    
    add_filter( 'tribe_events_community_category_dropdown_shown_item_count', '__return_1000' );

    Some code like the above, which you could add either to a custom plugin or – if you need to/prefer to – your theme or child theme’s functions.php file, ought to do the trick. In the unlikely event you have more than 1,000 categories you could of course increment the value here:

    return 1000;

    Hope that helps 🙂

    #1254868
    David
    Participant

    Thank you, worked like a charm!

    #1255387
    Barry
    Member

    Fantastic 🙂

    I’ll go ahead and close this topic. Incidentally, if your experience with our The Events Calendar-based products generally has been positive, we’d love to hear from you over here!

    Thanks again!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Show all categories on add event form’ is closed to new replies.