Skip to content

Instantly share code, notes, and snippets.

@colorful-tones
Created December 14, 2022 22:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colorful-tones/ddb38790de9f4ddc77f5038ba2c884f1 to your computer and use it in GitHub Desktop.
Save colorful-tones/ddb38790de9f4ddc77f5038ba2c884f1 to your computer and use it in GitHub Desktop.
function qorp_about_block_template_lookup( $template, $type, array $templates ) {
if ( $template && 'page-about.php' === $templates[0] ) {
add_filter( 'the_content', 'qorp_append_post_meta_output' );
}
}
add_filter( 'page_template', 'qorp_about_block_template_lookup', 20, 3 );
function qorp_append_post_meta_output( $content ) {
ob_start();
get_template_part( 'template-parts/team-members' );
$team = ob_get_clean();
return $content . $team;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment