Title: [Plugin: All-in-One Event Calendar] PHP Include Code
Last modified: August 20, 2016

---

# [Plugin: All-in-One Event Calendar] PHP Include Code

 *  [gwally](https://wordpress.org/support/users/gwally/)
 * (@gwally)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-all-in-one-event-calendar-php-include-code/)
 * Does AIOEC support PHP Includes?
 * I would like to embed the code directly on a page with two calendar categories
   posted side by side. I can’t seem to find any examples of php include code for
   templates.
 * [http://wordpress.org/extend/plugins/all-in-one-event-calendar/](http://wordpress.org/extend/plugins/all-in-one-event-calendar/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Richard](https://wordpress.org/support/users/richardgirling/)
 * (@richardgirling)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-all-in-one-event-calendar-php-include-code/#post-3126113)
 * Hi gwally,
 * I am not sure exactly what you are asking. Can you please rephrase your question.
 * Regards
 *  Thread Starter [gwally](https://wordpress.org/support/users/gwally/)
 * (@gwally)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-all-in-one-event-calendar-php-include-code/#post-3126148)
 * Some WordPress plug-ins allow you can directly embed a php include into a template
   page.
 * Can you show me an example on how to do this with All-in-One Event Calendar?
 * An additional goal is to embed two calendar categories side-by-side in a page
   template.
 *  [Richard](https://wordpress.org/support/users/richardgirling/)
 * (@richardgirling)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-all-in-one-event-calendar-php-include-code/#post-3126178)
 * Hi gwally,
 * This would come under custom work please contact [jenna@theseedstudio.com](https://wordpress.org/support/topic/plugin-all-in-one-event-calendar-php-include-code/jenna@theseedstudio.com?output_format=md)
   if you are interested in getting a quote.
 * Regards
 *  Thread Starter [gwally](https://wordpress.org/support/users/gwally/)
 * (@gwally)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-all-in-one-event-calendar-php-include-code/#post-3126179)
 * Seriously?
 * You want to charge me money just to answer a question that other WordPress Plug-
   ins routinely answer for free?
 * What I am looking for is the PHP code I could use to place the calendar in a 
   template. As an example, here is the same question for [Fast Secure Contact Form by Mike Challis](http://wordpress.org/extend/plugins/si-contact-form/):
 * [http://wordpress.org/support/topic/plugin-fast-secure-contact-form-add-form-with-php?replies=10](http://wordpress.org/support/topic/plugin-fast-secure-contact-form-add-form-with-php?replies=10)
 * This is the code he uses for his form:
 * >     ```
   >     <?php
   >     if ( isset($si_contact_form) ) {
   >      echo $si_contact_form->si_contact_form_short_code( array( 'form' => '1' ) );
   >     }
   >     ?>
   >     ```
   > 
 * I would like to know the same information for for All-in-One Event Calendar. 
   If your calendar does not allow it, just say so and don’t try and charge me to
   find the answer.
 * If there’s another calendar company that will let me do this, please let me know.
   I have no problem paying for a plug-in, I simply want to see if it will do something
   I need before I pay money.
 *  [bolinger](https://wordpress.org/support/users/bolinger/)
 * (@bolinger)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-all-in-one-event-calendar-php-include-code/#post-3126181)
 * any chance you found an answer to this?
 *  [bolinger](https://wordpress.org/support/users/bolinger/)
 * (@bolinger)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-all-in-one-event-calendar-php-include-code/#post-3126185)
 * I was able to use something liket this
 *     ```
       <?php
       query_posts( 'p=1975' );
       the_post();
       echo do_shortcode(get_the_content());
       wp_reset_query();
       ?>
       ```
   
 *  Thread Starter [gwally](https://wordpress.org/support/users/gwally/)
 * (@gwally)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-all-in-one-event-calendar-php-include-code/#post-3126192)
 * Thanks bollinger. I tried your suggestion and variations on it, but I have not
   been able to get it to work.
 * Maybe Richard could get Jenna to chime in on this.
 *  [Ula Szczepaniak](https://wordpress.org/support/users/ula-szczepaniak/)
 * (@ula-szczepaniak)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-all-in-one-event-calendar-php-include-code/#post-3126193)
 * [@gwally](https://wordpress.org/support/users/gwally/),
 * You can use the function get_events_between.
 *     ```
       <?php global ai1ec-calendar-helper;
       $events = $ai1ec_calendar_helper->get_events_between( $s_time, $e_time, $filter ); ?>
       ```
   
 * You set $s_time and $e_time to what you want.
    $filter it is array of filters
   for the events returned: [‘cat_ids’] => non-associatative array of category IDs[‘
   tag_ids’] => non-associatative array of tag IDs [‘post_ids’] => non-associatative
   array of post IDs
 * example:
 *     ```
       <?php global $ai1ec_calendar_helper;
       $results = $ai1ec_calendar_helper->get_events_between( time(), 9343908552, array( 'cat_ids' => '5' ) , $spanning = false);?>
       ```
   
 * Please let me know if is this the answer you are looking for?
 *  Thread Starter [gwally](https://wordpress.org/support/users/gwally/)
 * (@gwally)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-all-in-one-event-calendar-php-include-code/#post-3126194)
 * What I am looking for is a way to show the next event in a category.
 * There doesn’t seem to be a way to have two short code events on the same page.
   It would be nice to have something like this:
 * [ai1ec view=”next-event” cat_id=”5″]
    [ai1ec view=”agenda” cat_id=”5″]
 * Currently this will not work for several reasons. First off, the shortcode does
   not exist. Second, you cannot use more than one shortcode on any page. There’s
   also an issue where AI1EC shortcode will not work as hoped by staying exactly
   as you place it on a page.
 * So my hope was to figure out a php include in place of shortcode to hopefully
   force your plug-in to stay where I want it on a page template and function the
   way that works best for my Web site.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘[Plugin: All-in-One Event Calendar] PHP Include Code’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/all-in-one-event-calendar.svg)
 * [Timely All-in-One Events Calendar](https://wordpress.org/plugins/all-in-one-event-calendar/)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-event-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-event-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-event-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-event-calendar/reviews/)

 * 9 replies
 * 4 participants
 * Last reply from: [gwally](https://wordpress.org/support/users/gwally/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-all-in-one-event-calendar-php-include-code/#post-3126194)
 * Status: not resolved