WordPress.org

Ready to get started?Download WordPress

Forums

WP FullCalendar
Choosing Event category by WP Category (6 posts)

  1. Lanttu42
    Member
    Posted 1 year ago #

    I am pretty new with this whole WordPress stuff and plugins, but I'll try to explain my situation as good as I can.

    I have a wP Site which has three categories (Sports, Events and About). In the header I have three hard coded menulink buttons which points to these categories (i.e. <a href="http://localhost/www/category/sports/"> ) Well - Check out the site:
    http://www.team-sports.fi/www baby:carrot

    What I can do is that I can catch the current category to a string using PHP using this code:
    <?php $categories = get_the_category(); $my_current_cat = $categories[0]->cat_name; ?>

    Now the what I WANT to do is...

    When user clicks the Sports button and opens a page for Sports category, I would like to show a calendar events only from the category also named as Sports. How I could see it to work is something like: <?php echo WP_FullCalendar::calendar($args,<strong> $my_current_cat</strong>);?> but I know that it doesnt work like this.

    At the moment it shows events from every category before a user choses the event category (From that pulldown menu) which they want to see.

    I am using PHP to display calendar object and events comes from The Events Manager.

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

  2. jermdemo
    Member
    Posted 1 year ago #

    would like this feature as well, a user shouldn't have to filter manually on a category page

  3. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    I'll explain how it works for both Events Manager and normal posts:

    if you're using events manager then you should be able to do this using category="xx" in the shortcode as described here - http://wp-events-plugin.com/documentation/event-search-attributes/

    if using normal posts, you should be able to use the category name of your custom taxonomy (by default, also 'category', but e.g. could be 'post_tag' for tags). in this case you also use e.g. category="x" but for post types other than EM you can only choose one category where X is the id for the category

    hope that helps!

  4. spchile
    Member
    Posted 1 year ago #

    Hello, WPFullcalendar looks great! thanks a lot.
    Althoug I can't make it work in displaying a single category in a page.
    I'm not using Events Manager, I just want to use Fullcalendar as navigation to a specific category.
    I had tried:
    [fullcalendar category="xname"]
    [fullcalendar type="post" category="xname"]
    and other similar but the result is the entire categories list in the menu or just the blank calendar with no entries at all.
    Please help!

    Thanks in advance!

  5. spchile
    Member
    Posted 1 year ago #

    Hello again,
    OK, it works that way:
    [fullcalendar type="post" category="29"]
    But, I still have the full list of Categories in the menu.
    I need to make it dissapear.
    Any clue is welcome.
    Thanks in advance.

  6. spchile
    Member
    Posted 1 year ago #

    Ok,
    The newbie again.
    I'm not sure if this is the best solution -it could be helpful for someone- to avoid the list menu, in MAIN.CSS

    I add this line:
    #wpfc-calendar-search, .ui-selectmenu-menu, #wpfc-calendar-search select, .ui-selectmenu { display:none;}

    And commented /* */ the whole selectMenu css lines.

    If anyone knows a better solution please tell us.

    Thanks for the plugin again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic