@@ -14,16 +20,22 @@ the_post(); -get_template_part( 'template-parts/content', 'single' ); -// 文章操作按钮(分享和评论) + + get_template_part( 'template-parts/content', 'single' ); + + + + // 文章操作按钮(分享和评论) get_template_part( 'template-parts/post-actions' ); if (comments_open() || get_comments_number()) { comments_template(); } -if ( is_singular( 'post' ) ) { + + + if ( is_singular( 'post' ) ) { if (get_previous_post() || get_next_post()){ @@ -55,7 +67,9 @@ if ( is_singular( 'post' ) ) { } -$relatedPosts = get_option('argon_related_post', 'disabled'); + + + $relatedPosts = get_option('argon_related_post', 'disabled'); if ($relatedPosts != "disabled"){ @@ -65,13 +79,13 @@ $relatedPosts = get_option('argon_related_post', 'disabled'); if (strpos($relatedPosts, 'category') !== false){ - $cats = get_the_category($post->ID); + $cats = get_the_category($post -> ID); if ($cats){ foreach($cats as $key1 => $cat) { - $cat_array[$key1] = $cat->slug; + $cat_array[$key1] = $cat -> slug; } @@ -83,13 +97,13 @@ $relatedPosts = get_option('argon_related_post', 'disabled'); if (strpos($relatedPosts, 'tag') !== false){ - $tags = get_the_tags($post->ID); + $tags = get_the_tags($post -> ID); if ($tags){ foreach($tags as $key2 => $tag) { - $tag_array[$key2] = $tag->slug; + $tag_array[$key2] = $tag -> slug; } @@ -107,7 +121,7 @@ $relatedPosts = get_option('argon_related_post', 'disabled'); 'meta_key' => 'views', - 'post__not_in' => array($post->ID), + 'post__not_in' => array($post -> ID), 'tax_query' => array( @@ -139,7 +153,7 @@ $relatedPosts = get_option('argon_related_post', 'disabled'); )); - if ($query->have_posts()) { + if ($query -> have_posts()) { echo '