Posted: May 8, 2014 at 2:30 pm
|
Hello – I entered the shortcode of [EVENT_CUSTOM_VIEW template_name=”category-accordion” exclude=”17″] where 17 is the ID of the category I want to exclude, but it is still showing in the accordion. Thanks – |
Hello, That parameter is for the event id. Here is an example of how to use it: https://eventespresso.com/wiki/custom-template-add-on/#accordion — |
|
|
Hi, Lorenzo – Before I purchased this add-on, I was told by EE support staff that I could exclude specific categories. If this is not the case, I will need a refund, because it will not be useable for my site. Thank you – |
Hi Jennifer, Let me check with some team members to see if we can adjust the parameter to look for categories instead of events. Thanks. — |
|
Hi Jennifer, I’ve taken a look at the accordion template and it seems that functionality was intended to exclude single events rather than full categories. A small code change is need to exclude the full categories. Open up espresso-template-category-accordion/index.php on line 65 you’ll find: $catcode = $category->id; Make some space under that line and add: if($exclude && in_array($catcode, $exclude, true)) { continue; } That will remove the full category section although, say you have 2 categories ‘Cat 1’ & ‘Cat 2’. If you exclude Cat 1, that ‘dropdown’ will be removed from the output, but events in both (for example) Cat 1 & Cat 2 will still be displayed within the Cat 2 dropdown. As by default they would be displayed in both sections. If you prefer I can send you a copy of the accordion template with these changes to the email account linked with your account. |
|
|
Hi, Tony – This worked perfectly! As usual, EE support never ceases to be anything less than awesome. One other question: If I include this template in the uploads/espresso/templates folder, will it prevent the file from being changed if the plugin is updated? Thanks again! Jennifer |
Yes, you can move a copy of the template to the templates folder to ensure that your edits aren’t lost on a software update. Please see the guide at the end of this page: https://eventespresso.com/wiki/custom-template-add-on/#cel_custom — |
|
|
Thanks again! Jennifer |
The support post ‘Exclude Category from Accordion Template’ 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.