Remove "Show All Categories" from Community Event Submission Form

Home Forums Calendar Products Community Events Remove "Show All Categories" from Community Event Submission Form

  • This topic has 3 replies, 1 voice, and was last updated 9 years ago by Christopher Shomo.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1253232
    Christopher Shomo
    Participant

    Hi! My client wants to remove “Show All Categories” and just display all of them when the submission form loads. I found another thread with a code to add to the functions.php, but no luck in getting it to respond. Thanks for your help!

    #1253671
    Victor
    Member

    Hi Christopher!

    Thanks for reaching out to us! 🙂

    You can achieve that by putting the following code snippet into your theme’s functions.php file:

    function show_all_categories_community_add_form() {
    return 999999;
    }
    add_filter( 'tribe_events_community_category_dropdown_shown_item_count', 'show_all_categories_community_add_form');

    This will set the number of categories to show before the “Show all categories” link. So putting a really large number is, in practice, the same result as showing all categories.

    Let me know how this works for you.

    Best!

    Victor

    #1264239
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Remove "Show All Categories" from Community Event Submission Form’ is closed to new replies.