Skip to content

Instantly share code, notes, and snippets.

@Swapnildhanrale
Created May 7, 2020 05:42
Show Gist options
  • Save Swapnildhanrale/6bacea72c9347d65ba87358bfcb2b631 to your computer and use it in GitHub Desktop.
Save Swapnildhanrale/6bacea72c9347d65ba87358bfcb2b631 to your computer and use it in GitHub Desktop.
TO show all meta below post content on single and archive page
add_action('astra_entry_after', 'callback_function');
function callback_function(){
$enable_meta = apply_filters( 'astra_blog_post_meta_enabled', '__return_true' );
$post_meta = astra_get_option( 'blog-meta' );
if ( is_array( $post_meta ) && $enable_meta ) {
$output_str = astra_get_post_meta( $post_meta );
if ( ! empty( $output_str ) ) {
echo apply_filters( 'astra_blog_post_meta', '<div class="entry-meta">' . $output_str . '</div>', $output_str );
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment