WordPress.org

Ready to get started?Download WordPress

Forums

All-in-One Event Calendar
Link to Calendar with Forced Category Filtering (9 posts)

  1. greenrachel
    Member
    Posted 2 years ago #

    I really like this plugin, but the lack of documentation has made development extremely challenging and time-consuming. One issue that gave me a lot of trouble was figuring out how to format a link to the calendar page that would force a specific category to be shown. The link to use can be found by going into the admin section of your WordPress site and clicking Events > Event Categories. Hover the mouse over the name of any category and from the menu that pops up under the name click "View." Copy the link from the URL bar and use it as the href value of any anchor tag throughout your site. The link should be in the following format:

    http://myurl.com/mypage/?ai1ec_cat_ids=N

    where "myurl" is the URL of your blog, "mypage" is the name of the page (or numerical page ID, depending on your permalink settings) where the calendar plugin has been placed, and "N" is the numerical category ID.

    Hope this helps!

    http://wordpress.org/extend/plugins/all-in-one-event-calendar/

  2. nelra
    Member
    Posted 2 years ago #

    Thank you for posting the information that will help others. This is definitely one question we are looking to help with FAQs and also we will be adding a "shortcode" feature so you can load calendars with certain defaults (category, tags, etc) on any page

  3. inaday
    Member
    Posted 2 years ago #

    Awesome Greenrachel... I agree - this is a fabulous plugin but sometimes it is hard to find out how to achieve some of the more intricate tweaks.

    To extend your very useful tip, a similar affect can be achieved for Tags as follows :

    http://myurl.com/mypage/?ai1ec_tag_ids=N

    where "myurl" is the URL of your blog, "mypage" is the name of the page (or numerical page ID, depending on your permalink settings) where the calendar plugin has been placed, and "N" is the numerical Tag ID.

    You can also display in Agenda view by adding #action=ai1ec_agenda producing a link of the form :

    http://myurl.com/mypage/?ai1ec_tag_ids=N#action=ai1ec_agenda

    (note: the above links will initially display the full calendar but will then switch to a filtered view - and Agenda view only shows upcoming (not past) events)

  4. tarundeology
    Member
    Posted 2 years ago #

    What a time saver!! Thank you very much.

    I've completed 80% from 60% when I plugged this in. Then I got request for new event, recent event, past event page to display the event automatically. I tried to use the code below to call for the event in the loop:

    <?php $args=array(
          'cat' => 53, // event category ID
          'showposts' => 1,
          'caller_get_posts' => 1,
          'offset' => 2
    
    		);
        $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?>
    	<h2 class="et_pt_title"><?php the_title(); ?></h2>
    
    						<p class="et_pt_blogmeta"><?php esc_html_e('Posted','Chameleon'); ?> <?php esc_html_e('by','Chameleon'); ?> <?php the_author_posts_link(); ?> <?php esc_html_e('on','Chameleon'); ?> <?php the_time(esc_attr(get_option('chameleon_date_format'))) ?> <?php esc_html_e('in','Chameleon'); ?> <?php the_category(', ') ?> | <?php comments_popup_link(esc_html__('0 comments','Chameleon'), esc_html__('1 comment','Chameleon'), '% '.esc_html__('comments','Chameleon')); ?></p>
        <?php
          the_content();
          endwhile;
        } //if ($my_query)
      wp_reset_query();  // Restore global post data stomped by the_post().
        ?>
    	</div><ol>

    .. but it turned out nothing shown in the respective page. Is there anyway I could call category or event in the loop?

    Another thing is, can I show small calendar like wp default calendar instead of list uf upcoming events?

    Finally, how can I show upcoming events in specific category in specific page? This is very useful because user might only interested in events in a specific category rather than all events from the blog. For instance, if user is in sports page, they might not interested to see events in finance category. User might miss the event he likes if the his events is not shown in the upcoming sidebar.

    Thanks again for creating this wonderful plugin. :D

  5. greenrachel
    Member
    Posted 2 years ago #

    Hey tarundeology,

    I can only answer your last question at the moment, but hopefully that will at least help you get one thing off your plate!

    I solved the issue of wanting to display upcoming events for only a specific category on a specific page by using the Widgets On Pages plugin in conjunction with the Upcoming Events widget provided by this plugin. When you create an Ai1ec Upcoming Events widget (through Appearance -> Widgets in the WordPress admin dashboard) there is an option to limit that particular widget to just show events from one or more categories that you select from a provided dropdown list. There are a few other sorting options as well, such as by tags. You can then create a widget space using the Widgets on Pages plugin and use the appropriate shortcode to place the widget on the page where you want in to show up. (The documentation for the Widgets on Pages is pretty good so this should be pretty easy to do).

  6. tarundeology
    Member
    Posted 2 years ago #

    thanks greenrachel.

    Yes I found the option for showing specific events in specific events categories, which is AWESOME!! Now I have specific upcoming events list for specific page. thank you thank you thank you!!

    I wonder is the category and event ID valid throughout wordpress? like I said earlier I tried to call one event category in the loop but it returns nothing.

    While waiting for your reply I was wondering around and I found this great simple plugin Widget Logic. It solves all my sidebar issues from last year! You guys are great!!!

    Lastly, is it possible to have the full event to have it's own template, in this case I want it to be full width.

    If it's not too late, Happy New Year!

  7. tarundeology
    Member
    Posted 2 years ago #

    if we know how to call event and event category, there are so my customization we could do. it seems that wordpress cannot call the category and event ID. please tell me how. thanks.

  8. nelra
    Member
    Posted 2 years ago #

    There are a few ways to do things - for categories, one would be:
    get_terms( 'events_categories', $args );

    For events themselves, it depends on what you want to do exactly. You can query the ai1ec_event table, or do get_posts where post_type = ai1ec_event

  9. tarundeology
    Member
    Posted 2 years ago #

    I try to achieve this:
    Say I have event for example on 1, 2, 4 & 5 january 2012 and today is 3 January 2012. I want to place it in the way below:

    1. next event (show the closest next event in full single page - 4 Jan)
    2. upcoming event (show an event after next event in full single page - 5 Jan)
    3. recent event (show an event that just past before today in full single page - 2 Jan)
    4. events archive (show past events with title, link and excerpt from the event before recent event backword - just like usual blog archive page.)

    I can do this using the code below if I'm using regular wordpress category to:

    <?php $args=array(
          'cat' => 5,
          'showposts' => 1,
          'caller_get_posts' => 1,
          'offset' => 1
        );
        $my_query = new WP_Query($args);
        if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?>
    	<h3><strong><a href="<?php the_permalink() ?>" rel="bookmark" title="Pautan ke <?php the_title_attribute(); ?>"><?php the_title(); ?></a></strong></h3>
        <?php
          the_excerpt();
          endwhile;
        } //if ($my_query)
      wp_reset_query();  // Restore global post data stomped by the_post().
        ?>

    I can use the arguments

    $args=array(
          'cat' => 5,
          'showposts' => 1,
          'caller_get_posts' => 1,
          'offset' => 1 and

    to achieve this is using category post ID. But since I cant use the events categories nor IDs (because I dont know how), I'm stuck. One more thing that if I didnt use a proper function, the 4 pages will place the events depend on when that event (custom post type) is created, not the date of the event.
    I'm stuck here........Any help will be appreciated.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic