Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created December 5, 2014 03:44
Show Gist options
  • Select an option

  • Save joshfeck/c9fa266d3a267187bacb to your computer and use it in GitHub Desktop.

Select an option

Save joshfeck/c9fa266d3a267187bacb to your computer and use it in GitHub Desktop.
A little helper function for EE4 to use the old EE_META shortcode from EE3 on an event custom post. Idea from http://eventespresso.com/topic/how-to-use-ee_meta-in-event-expresso-4-for-backwards-compatibility/
function display_custom_meta_in_ee4( $atts ){
global $post;
extract( shortcode_atts( array( 'type' => '', 'name' => '' ), $atts ) );
$post_meta = get_post_meta( $post->ID, $name, TRUE );
return $post_meta;
}
add_shortcode( 'EE_META', 'display_custom_meta_in_ee4' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment