Home › Forums › Calendar Products › Events Calendar PRO › Event Categories as Post Categories
- This topic has 5 replies, 4 voices, and was last updated 7 years, 2 months ago by Michael.
-
AuthorPosts
-
February 1, 2017 at 8:56 am #1227617MichaelParticipant
Hello,
My WordPress theme supports image sliders and banners that will display posts by category. I would like to display upcoming events via these sliders and banners (using the featured image.)
Is it possible for me to have the event categories function as regular post categories?
It seems redundant to create posts and post categories just to display events in the sliders and banners.
I’ve tried to switch on ‘Include events in main blog loop’ and my theme does not recognize the event categories.
Thanks,
MichaelFebruary 2, 2017 at 12:53 pm #1228497NicoMemberHi there Michael,
Thanks for getting in touch with us! I can help you here 🙂
You can enable ‘default’ categories for Event by adding the following snippet in your theme’s (or child theme’s) functions.php file:
https://gist.github.com/niconerd/4445c5e205ef1de3690f6094159e9f88
Please let me know if this works for you,
Best,
NicoFebruary 3, 2017 at 12:55 pm #1229147MichaelParticipantHello Nico,
Thanks for your reply. I added the snippet of code to the bottom of the functions file and it doesn’t seem to work quite right. The default Categories box appears on the edit event page but as soon as I select a category and select update, I receive errors.
Warning: Cannot modify header information - headers already sent by (output started at /home/equipm8/public_html/events/wp-content/themes/colormag-pro/functions.php:202) in /home/equipm8/public_html/events/wp-admin/post.php on line 197 Warning: Cannot modify header information - headers already sent by (output started at /home/equipm8/public_html/events/wp-content/themes/colormag-pro/functions.php:202) in /home/equipm8/public_html/events/wp-includes/pluggable.php on line 1174
I’m not sure what’s going on here. Thanks for your assistance. -Michael
February 6, 2017 at 11:53 am #1230105NicoMemberThanks for following up Michael! I’ve just re-tested (did it before sending it) and it’s working as intended on my site.
Can you please let me know what’s on line 202 of the functions file? Was the snippet there?
Let’s try two things here:
1- Try to past the code in a plain text editor before pasting in the functions code. Make sure to remove the opening php tag if it’s not closed (<?php).
2- If the above doesn’t work please try to switch to a default theme like TweentySeventeen and pasting the snippet (remember to paste in a plain text editor before pasting it in the actual functions file) temporarily in the default theme functions file. Make sure to disable all plugin that are not related to The Events Calendar.
Hope that will give us a bit more info on what’s going on,
Best,
NicoFebruary 28, 2017 at 8:35 am #1246956Support DroidKeymasterHey 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 -
AuthorPosts
- The topic ‘Event Categories as Post Categories’ is closed to new replies.