Posted: November 8, 2013 at 2:25 am
|
Hello, I managed to get my calendar working the other other day. I have styled it and it looks really nice. I would like to make the following changes and am thinking I may need to adjust some core code. The calendar to default to a specific month/date? Exclude one category of events from the calendar? Any pointers will be greatly received. |
|
Hi Ricardo, Regarding the specific month, you are right, it does need a code edit. Check out this forum thread – https://eventespresso.com/topic/display-next-months-calendar/ It isn’t possible to exclude categories, at least not without a level of customisation that is beyond what support can provide. The next version of the Calendar Add On does have a front end filtering system though, so a user can select the category and the calendar only displays those categories – sneak peak http://d.pr/i/uEG8 Otherwise you would need a developer – https://eventespresso.com/developers/event-espresso-pros/ |
|
Thank you very much, the default month worked perfectly. I was looking through the code and saw some lines like: and was wandering if a cheeky: |
|
So as a work around I added a category call calendar, then just placed all the events I wanted to be displayed in it and used the cat_id filtering short code. My next question is how to filter the search? Even if you could tell me the php pages responsible for the search results and results in the ajax autofill? This would be a great help please. |
|
Hi Ricardo, That’s was a good idea, what I did was add if($event->category_id =="1") {continue;} after the foreach ( $events_data as $event ) { to effectively skip the events with that category. The search, I am assuming the [EVENT_SEARCH] shortcode. If so, then that is found in event-espresso/includes/shortcodes.php. YOu may be best copying that shortocde to the custom files addon and changing its name/shortcode tag to make a new shortcode and edit it there. It will stop it from being over written by updates. |
|
I excluded the events in the autocomplete by adding: $SQL .= ” AND e.id NOT IN (78,79,80,81,82,83,84,85) “; Great that worked, however I need to filter the search results page? Thanks |
|
Don’t worry I made a similar edit to event-espresso/templates/event_list.php. Thanks |
The support post ‘Calendar customization’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.