• buskerdog

    (@buskerdog)


    I found an old thread on this but they didn’t really solve this problem, just created a workaround that I don’t like. There has to be a way to tell Event Calendar to set all the posts it creates to a crtain category (i.e. an Event category or something like that).
    I was looking around in the Event Calendar files and found places where it sets its variable for posting. I even found one that was for category, but I wasn’t able to make it do what I wanted. Any ideas? Like can you just tell it to $Category_ID = '12' or something like that?

Viewing 4 replies - 1 through 4 (of 4 total)
  • 2xab

    (@2xab)

    I just started a new Blog, and I have multiple categories in it. I want to be able to post specific categories only to specific static pages and only have the “blog” category show up on the blog home page. Does anyone know if this is possible?

    My wordpress is self hosted.

    Yes, I also am trying to do this too…

    In our install we have for example a list of rock band events that are displayed on the calendar. we also add another category to the event (called the bands name) and on the bands name page I would like to list only upcoming events for that band.

    @buskerdog – What was the old thread? Can you post the link please.

    Is it possible to tell Event Calendar to only pull upcoming events from ie Category id = 12 ?

    Thanks, Leon.

    I’m currently trying to do the same with EC3, anyone know the answer?

    scotthenning

    (@scotthenning)

    I needed to do this as well, specifically what @buskerdog requested.

    This is how I did it. I have WP 2.9.1 and Events Calendar 6.6 Beta. In the “ec_management.class.php” file on line 170 the plugin creates the array with all the post info to insert into the database: “$data = array…”

    What you need to do is edit line 174:

    'post_category' => $post_author

    You need to replace “$post_author” with an array (it HAS to be an array) of the numbers – the IDs corresponding to the categories you would like to automatically add. So for example if you wanted to add categories with IDs 2,5,17 to the post that the Events Calendar plugin generates, your new, edited line 174 would look like this:

    'post_category' => array(2,5,17)

    And voila, there you have it. Create an event and your post should have those categories assigned to it. Remember your categories have to exist ahead of time in order to be assigned by the plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Event Calendar] Posting to a specific category?’ is closed to new replies.