Event Categories as Post Categories

Home Forums Calendar Products Events Calendar PRO Event Categories as Post Categories

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1227617
    Michael
    Participant

    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,
    Michael

    #1228497
    Nico
    Member

    Hi 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,
    Nico

    #1229147
    Michael
    Participant

    Hello 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

    #1230105
    Nico
    Member

    Thanks 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,
    Nico

    #1246956
    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 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Event Categories as Post Categories’ is closed to new replies.