WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. gwally
    Member
    Posted 1 year 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.

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

  2. Richard
    Member
    Posted 1 year ago #

    Hi gwally,

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

    Regards

  3. gwally
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

    Hi gwally,

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

    Regards

  5. gwally
    Member
    Posted 1 year ago #

    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.

  6. bolinger
    Member
    Posted 1 year ago #

    any chance you found an answer to this?

  7. bolinger
    Member
    Posted 1 year ago #

    I was able to use something liket this

    <?php
    query_posts( 'p=1975' );
    the_post();
    echo do_shortcode(get_the_content());
    wp_reset_query();
    ?>
  8. gwally
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

  10. gwally
    Member
    Posted 1 year 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

About this Topic

Tags

No tags yet.