using custom fields in events-list.php template
-
Hi
I’m trying to use custom fields in events-list.php template. Yet the $image is not displaying. Can you advise?
Thanksglobal $post; $EM_Event = em_get_event($post->ID, 'post_id'); $postid = $EM_Event->post_id; $price = get_field('price'); $image = get_field('main_event_image', $postid ); echo EM_Events::output( array('format'=>' <header class="entry-header"> <a href="#_EVENTURL"><img src="' . $image . '" alt="#_EVENTNAME"></a> <div class="image-layer"></div> </header>') );
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘using custom fields in events-list.php template’ is closed to new replies.