WordPress.org

Ready to get started?Download WordPress

Forums

WP FullCalendar
limit to one category (6 posts)

  1. stimsonm
    Member
    Posted 1 year ago #

    how do i limit the full calendar to just one category ?

    http://wordpress.org/extend/plugins/wp-fullcalendar/

  2. orgnsm
    Member
    Posted 1 year ago #

    i was curious about this too.. i realize it is a feature of this calendar to expose category selection to the user, but i would like to bypass that and restrict all my calendar items to a certain category.. i think there is a way to edit the code and add this restriction to the SQL query. i'll post here if i am able to figure anything out.

  3. orgnsm
    Member
    Posted 1 year ago #

    you can go into your editor at:
    /wp-admin/plugin-editor.php?file=wp-fullcalendar/wp-fullcalendar.php

    and (after the line "//sort out args") add:
    $_REQUEST['category'] = 3;

    where 3 is the id of the category you want to select...
    works for me

  4. orgnsm
    Member
    Posted 1 year ago #

    just read that you can also select in a shortcode:

    [fullcalendar type="post" category="3"]

  5. sberman
    Member
    Posted 10 months ago #

    This is the exact question I am looking for. I have blog posts in various categories. However, I only want the posts assigned to category "Calendar" to show on the calendar by default. I tried this shortcode on the page:

    [fullcalendar type="post" category="calendar"]
    or
    [fullcalendar type="post" category="Calendar"]

    That didn't work. All that resulted is ALL posts disappeared from the calendar.

    I tried editing:
    /wp-admin/plugin-editor.php?file=wp-fullcalendar/wp-fullcalendar.php

    and (after the line "//sort out args") added:
    $_REQUEST['category'] = calendar;
    or
    $_REQUEST['category'] = Calendar;

    Same thing happened, NO events displayed on the calendar at all. If you look at my blog (http://apta.dmediaweb.com/calendar/) I do have 2 posts assigned to that category. What else can I try? Thank you!

  6. Harrison O.
    Member
    Posted 9 months ago #

    @sberman
    Use category ID instead of category name and it should work.

    [fullcalendar category="15"]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.