WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. mistermango
    Member
    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:

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

    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?

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

  2. dj.spacemonkey
    Member
    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
    Member
    Posted 2 years ago #

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

  4. Naii
    Member
    Posted 2 years ago #

    Any progress in here which could help others?

  5. hypeon
    Member
    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