Custom Fields inside the plugin
-
I need some more info to go along Time and Location of the event, and thought about using the custom fields to add it. But it doesn’t seem to be working. Is it even possible to use custom fields in a plugin (even if it’s inside the loop)? How do I go about doing that?
I just need it on my event-single.php. I tried:<div class="timely ai1ec-event-id-<?php echo $event->post_id; ?><?php if ( $event->get_multiday() ) echo 'ai1ec-multiday'; ?><?php if ( $event->allday ) echo 'ai1ec-allday'; ?>"> <span class="eventinfo"><?php _e( 'Quando:', AI1EC_PLUGIN_NAME ); ?> <b><?php echo $event->get_timespan_html(); ?></b></span><br /> <span class="eventinfo"><?php _e( 'Onde:', AI1EC_PLUGIN_NAME ); ?> <b><?php echo $location; ?></b></span> <span class="eventinfo">Reprise: <b><?php echo get_post_meta($post->ID, 'reprise', true) ?></b></span> </div>And also
<?php $key="reprise"; echo get_post_meta($post->ID, $key, true); ?>But this won’t return me the values on “reprise” as I hoped it would. Nothing bad happens, it’s just a blank space.
Anyone?
The topic ‘Custom Fields inside the plugin’ is closed to new replies.