Merge pull request #1271 from Automattic/fixes-1148/remove-post-format-function-call

Replace the get_post_format() calls in get_template_part() with get_post_type()
This commit is contained in:
Chris Runnells 2018-02-28 11:24:59 -10:00 committed by GitHub
commit 2aa0da6abe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -27,11 +27,11 @@ get_header(); ?>
while ( have_posts() ) : the_post(); while ( have_posts() ) : the_post();
/* /*
* Include the Post-Format-specific template for the content. * Include the Post-Type-specific template for the content.
* If you want to override this in a child theme, then include a file * If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead. * called content-___.php (where ___ is the Post Type name) and that will be used instead.
*/ */
get_template_part( 'template-parts/content', get_post_format() ); get_template_part( 'template-parts/content', get_post_type() );
endwhile; endwhile;

View File

@ -53,7 +53,7 @@ function _s_infinite_scroll_render() {
if ( is_search() ) : if ( is_search() ) :
get_template_part( 'template-parts/content', 'search' ); get_template_part( 'template-parts/content', 'search' );
else : else :
get_template_part( 'template-parts/content', get_post_format() ); get_template_part( 'template-parts/content', get_post_type() );
endif; endif;
} }
} }

View File

@ -32,11 +32,11 @@ get_header(); ?>
while ( have_posts() ) : the_post(); while ( have_posts() ) : the_post();
/* /*
* Include the Post-Format-specific template for the content. * Include the Post-Type-specific template for the content.
* If you want to override this in a child theme, then include a file * If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead. * called content-___.php (where ___ is the Post Type name) and that will be used instead.
*/ */
get_template_part( 'template-parts/content', get_post_format() ); get_template_part( 'template-parts/content', get_post_type() );
endwhile; endwhile;