We're merging with GenerateBlocks! Learn more here.

Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Help me achieve something similar Reply To: Help me achieve something similar


I hate to bother you with this again but im so close yet far enough not to make it work on myself.

I have changed plugins and is now using events manager. I would like to get the post meta and not a custom post meta i added myself so was wondering if using code below can work

function get_post_meta( $post_id, $key = '', $single = false ) {
	        return get_metadata('post', $post_id, $key, $single);

When i do this (below) i get all the meta keys as seen here http://pastebin.com/fGjdvhwD

//Wpsp show meta instead of content
add_action( 'wpsp_before_content','wpsp_add_custom_meta' );
function wpsp_add_custom_meta()
    $meta = get_post_meta( get_the_ID(), '', false );
    if ( isset( $meta ) && '' !== $meta )
        print_r( $meta );

Now when i use the code in your last reply, i get all the relevant meta but all of it on one line.

To summarize my question:
1. Can i use get_metadata to output all the post metadata?
2. If no. 1 is not possible, how can i put a line break after each meta data?

Please do tell me if this is out of the scope of this forum, i would hate to bother you unnecessarily