Change which template is served in a Twenty Twenty-One child theme to incorporate wporg-developer
This file contains 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
<?php | |
//In single.php of twentytwentyone theme, find this line | |
get_template_part( 'template-parts/content/content-single' ); | |
//and replace it with this condition to blend the code reference features of the wporg-developer theme | |
if( DevHub\is_parsed_post_type() ) | |
{ | |
get_template_part( 'content', 'reference' ); | |
} | |
else | |
{ | |
get_template_part( 'template-parts/content/content-single' ); | |
} | |
//learn more https://coreysalzano.com/wordpress/mimic-the-wordpress-org-developer-reference/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment