Ready to get started?Download WordPress


All-in-One Event Calendar
Custom FIelds in Event View (5 posts)

  1. mistermango
    Posted 2 years ago #

    I've been round and round trying to place the value of a custom field from an event entry into the event view. I can't seem to call it and must be doing something wrong with the php or am missing an intricacy of Ai1ec.

    An example event page is: http://internationalfocusnc.org/ai1ec_event/ritmo-latino/?instance_id=

    My code is:

    <?php if( $website ): ?>
    <th scope="row" class="ai1ec-cost"><?php _e( 'Website:', AI1EC_PLUGIN_NAME ) ?></th>
    <td class="ai1ec-cost"><?php echo get_post_meta($post->ID, 'website', true); ?></td>
    <?php endif ?>

    The word "Website:" displays on the left, so I know I'm in the right place, but no matter how many post_meta combinations I try, I can't get it to call the value for $website. I can get call the $key and $value using the_meta(), so I know the post meta is there.

    Can anyone help with this?


  2. dj.spacemonkey
    Posted 2 years ago #

    +1 to not being able to get custom fields to show up in the event. I've tried using one of the plugin's own custom fields (gig_website) as well as creating my own (gig_restricted) but can make neither surface in a published event.

  3. jcrea
    Posted 2 years ago #

    You can try this.
    <?php echo get_post_meta( $event->post_id, 'website', true); ?>

  4. Naii
    Posted 2 years ago #

    Any progress in here which could help others?

  5. hypeon
    Posted 1 year ago #

    I'm bumping this up just because I've spent days trying to find the right answer and even the support team at All-In-One had thrown in extra ideas that unfortunately weren't succesful. But this one actually works! Thanks jcrea!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic