Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Rendering post meta from a plugin.
<?php
add_filter( 'the_content', function( $content ){
$extra_content = get_post_meta( 'extra_content', $post->ID );
if ( ! empty($extra_content ) )
return $content . $extra_content ;
else
return $content;
}, 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.