← Back
Editing: single.php
<?php /** * The template for displaying all single posts * * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post * * @package WP_Bootstrap_Starter */ get_header(); ?> <?php while ( have_posts() ) : the_post(); if (in_category(38) || in_category(40)) {// news default, cat parent id get_template_part('template-parts/content', 'news'); } else if (in_category(131) || in_category(133)) { get_template_part('template-parts/content', 'news-1'); } else if (in_category(48) || in_category(50) || in_category(52) || in_category(54) || in_category(56) || in_category(58) || in_category(60) || in_category(62)) { get_template_part('template-parts/content', 'product'); } else { get_template_part('template-parts/content', get_post_format()); } // the_post_navigation(); // If comments are open or we have at least one comment, load up the comment template. if ( comments_open() || get_comments_number() ) : comments_template(); endif; endwhile; // End of the loop. ?> <?php get_footer();
Save File
Cancel