Show All Categories for New Event

Home Forums Calendar Products Events Calendar PRO Show All Categories for New Event

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #265039
    persyst
    Participant

    How can I have the Event Categories default to “Show All Categories” for when a User (or myself) is creating/posting a New Event?
    Thanks,
    Stefan

    #265717

    Hi!

    Thanks for taking the time to reach out to us with your question. To confirm your question you are talking about the “Events Category” meta-box on the admin page as shown in the below screen shot?

    Event Categories

    If so we utilize existing WordPress functionality for Categories and don’t modify their functionality. If you want to modify how categories work I would suggest reaching to in the wordpress.org forums as someone there may have some hints/tips on defaulting to show all.

    If I am mistaken in what you are looking for please let me know so I can help you further.

    Thanks again for reaching out to us.

    – Matthew

    #270772
    persyst
    Participant

    Thanks for the reply. However, I am referring to the Event Category section on the front-end at events/community/add. I have more the 12 categories and it shows the first 9 all at once, then a tiny drop down arrow appears below that says “Show all categories ( 12 )”. I would like all categories to be shown by default.

    Thanks,
    Stefan

    #309636

    Hi Stefan:

    Thank you for clarifying the change you wanted to make. I took a look at the Community Events form and below are the details you are looking for. Unfortunately the 9 category limit is hard coded in the code base so you have 2 options for modifications:)

    Easiest – However will be overwritten if you update plugin

    1. <span style=”line-height: 13px;”>Open the file /lib/tribe-community-events.class.php in plugins/events-community</span>
    2. Search for formCategoryDropdown and replace both instances of “9” with “20” or similar larger number

    Full Method – won’t be over wrriten with updates to plugin

    1. Copy the function from following gist link to your themes function.php file
    2. Override the taxonomy template in your own theme by creating a file at
      [your-theme]/tribe-events/community/modules/taxonomy.php
    3. Modify the following line of code
      <?php TribeCommunityEvents::instance()->formCategoryDropdown( null, $currently_selected_category_ids ); ?>
    4. to :
      <?php formCategoryDropdown__override( null, $currently_selected_category_ids ); ?>

    Each of the above methods will increase the number of categories that are shown by default. Please let me know if any issues implementing the changes.

    Thank you,

    – Matthew

    #335010
    persyst
    Participant

    Hi Matthew,

    I’m still having a problem:
    I added the gist link text to the end of my themes function.php
    and copied the taxonomy.php from
    cypherspot.com/wp-content/plugins/the-events-calendar-community-events/views/community/taxonomy.php

    then pasted it to

    /cypherspot.com/wp-content/themes/make/tribe-events/community/modules/taxonomy.php

    and swapped the line
    <?php TribeCommunityEvents::instance()->formCategoryDropdown( null, $currently_selected_category_ids ); ?>

    with the new one

    <?php formCategoryDropdown__override( null, $currently_selected_category_ids ); ?>

    but now the “Add Event Page” is almost completely blank. I only see this text and nothing else, no boxes, no nothing.

    “My Events”
    “Not admin? Log Out”
    “Event Title:(required) ”
    “Event Description:(required) ”
    “Text Visual ”
    “Event Categories: ”

    Please help!
    Thanks,
    Stefan

    #335252
    persyst
    Participant

    Typo earlier, I copied the taxonomy.php from
    cypherspot.com/wp-content/plugins/the-events-calendar-community-events/views/community/modules/taxonomy.php

    #335452
    persyst
    Participant

    Hi Matthew,

    I tried option 1, changing the 9’s to 20’s in the /cypherspot.com/wp-content/plugins/the-events-calendar-community-events/lib/tribe-community-events.class.php below the formCategoryDropdown area
    at :
    // Show the first 9 categories.
    if ( $i < 9 )
    and
    if ( count( $cats ) > 9 )

    but this ends up giving me an http 500 error and I then the only way to access the front-end of my site from is by re-uploading the original tribe-community-events.class.php file that I have locally. Because changing the 20’s back to 9’s would not undo the error.

    Please Help!!
    Thanks,
    Stefan

    #342296

    Hi:

    Changing the 9s to 20s would only cause the behavior you outline if another portion of the file was edited. Did you by chance delete a ) or similar character when making the edit?

    I need to revert my test site and run the snippet I sent your way and will have an update for you shortly.

    Thanks for your patience,

    – Matthew

    #347379
    persyst
    Participant

    Hi Matthew,

    Ok, thanks. I would prefer to use Option 1, since it will not be effected by a calendar upgrade. I’ll wait for your response regarding how to implement this, since I could not get it working as stated above.

    For Option 2, I definitely only changed the “9” character to a “20” in the two locations, when I received the error.

    Thanks for you help,
    Stefan

    #352250

    Hi Stefan:

    My apologies, I re-tested the code on my site and noticed I gave you a typo! Shame on me. Let me try this again.

    1. copy the function from original gist into your theme’s functions.php file
    2. Use this gist‘s code for the content of the taxonomy.php file.
      The location you specified earlier was correct so shouldn’t need to make any modifications.

    Let me know if this doesn’t work for you but you should be all set It currenlty is working on my site as shown in this quick screen capture: https://cloudup.com/iJBeWDdHmT6

    Again my apologies for the original typo in the code,

    – Matthew

    #380888
    persyst
    Participant

    Thanks! That update worked!!

    #393575

    Stefan:

    Exellent, Sorry again for my typo! I’m going to mark this thread as closed. If you have any additional questions on the plugins please feel free to create another thread!

    Also if you have a minute or two we would love it if you could say a few words about our plugin here : http://m.tri.be/lo

    Thank you,

    – Matthew

    #1001844
    Leah
    Member

    Hi there,

    I wanted to report back to you on the status of this issue. Your report is tracked in our internal system and a fix is on our to-do list, but we were not able to fit it into our upcoming 3.12 release. Please know that the issue is still very much on our radar and we will be working on it for a future release. We appreciate your patience while we work to improve our plugins. Thank you for using The Events Calendar!

    Best,
    Leah
    and The Events Calendar team

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Show All Categories for New Event’ is closed to new replies.