All-in-One Event Calendar
PHP Include Code (10 posts)

  1. gwally
    Posted 3 years ago #

    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.


  2. Richard
    Posted 3 years ago #

    Hi gwally,

    I am not sure exactly what you are asking. Can you please rephrase your question.


  3. gwally
    Posted 3 years ago #

    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.

  4. Richard
    Posted 3 years ago #

    Hi gwally,

    This would come under custom work please contact jenna@theseedstudio.com if you are interested in getting a quote.


  5. gwally
    Posted 3 years ago #


    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:


    This is the code he uses for his form:

    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.

  6. bolinger
    Posted 3 years ago #

    any chance you found an answer to this?

  7. bolinger
    Posted 3 years ago #

    I was able to use something liket this

    query_posts( 'p=1975' );
    echo do_shortcode(get_the_content());
  8. gwally
    Posted 3 years ago #

    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.

  9. Ula Szczepaniak
    Posted 3 years ago #


    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


    <?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?

  10. gwally
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • All-in-One Event Calendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.