WordPress.org

Support

Support » Plugins and Hacks » [Plugin: All-in-One Event Calendar] PHP Include Code

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Richard
    Member

    @richardgirling

    Hi gwally,

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

    Regards

    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
    Member

    @richardgirling

    Hi gwally,

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

    Regards

    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/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.

    any chance you found an answer to this?

    I was able to use something liket this

    <?php
    query_posts( 'p=1975' );
    the_post();
    echo do_shortcode(get_the_content());
    wp_reset_query();
    ?>

    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
    Member

    @ula-szczepaniak

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

    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.