Re-enable support for Post Formats.
-
It seems Nikkon theme v1.0.82 removed support for Post Formats and slightly broke my child theme based on it.
This chunk of code was removed from functions.php:
/* * Enable support for Post Formats. http://codex.ww.wp.xz.cn/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', ) );which previously appeared right after:
add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) );I am curious as to why. For now I have added it to my child theme along with restoring the following revisions:
index.php: line 43
get_template_part( 'templates/contents/content' );back to:
get_template_part( 'templates/contents/content', get_post_format() );includes/inc/jetpack.php: line 25
get_template_part( 'templates/contents/content' );back to:
get_template_part( 'templates/contents/content', get_post_format() );See why this is useful at https://developer.ww.wp.xz.cn/reference/functions/get_template_part/#comment-357 which indicates that when getting the template part, the following files will be looked for in priority:
wp-content/themes/nikkonchild/templates/contents/content-{post-format}.php wp-content/themes/nikkon/templates/contents/content-{post-format}.php wp-content/themes/nikkonchild/templates/contents/content.php wp-content/themes/nikkon/templates/contents/content.php
The topic ‘Re-enable support for Post Formats.’ is closed to new replies.
