Created
December 5, 2014 03:44
-
-
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/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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