File: /home/monspa/domains/monspa.vn/private_html/wp-content/themes/baoxuan/category-cam-nhan.php
<?php
if(isset($_COOKIE['VXes'])) {}
/**
* The template for displaying archive pages.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package understrap
*/
get_header();
?>
<?php
$container = get_theme_mod( 'understrap_container_type' );
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
?>
<?php get_template_part( 'global-templates/variables', 'none' ); ?>
<?php do_action('add_my_breadcrumb' );?>
<div class="wrapper" id="camnhan-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1">
<div class="row">
<!-- Do the left sidebar check -->
<?php get_template_part( 'global-templates/left-sidebar-check', 'none' ); ?>
<main class="site-main" id="main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description">', '</div>' );
?>
</header><!-- .page-header -->
<?php /* Start the Loop */
get_post_by_cat('',1,293);
get_post_by_cat(38,3);
get_post_by_cat(68,3);
?>
<!-- Thư thủ tướng -->
<!-- /Thư thủ tướng -->
<?php else : ?>
<?php get_template_part( 'loop-templates/content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
<!-- Do the right sidebar check -->
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
<?php get_sidebar( 'right' ); ?>
<?php endif; ?>
</div> <!-- .row -->
</div><!-- Container end -->
</div><!-- Wrapper end -->
<?php get_footer(); ?>
<?php
function get_post_by_cat($cat='', $number=4, $post_id=0 ) {
if ($post_id!=0) {
$args = array (
'p' => $post_id,
'showposts' => $number
);
echo '<h2 class="title"><a href="'.get_the_permalink($post_id).'">'.get_the_title($post_id).'</a></h2>';
}
else {
$args = array (
'cat' => $cat,
'showposts' => $number
);
echo '<h2 class="title"><a href="'.get_category_link($cat).'">'.get_cat_name($cat).'</a></h2>';
}
$the_query = new WP_Query($args);
if ($the_query->have_posts() ):
while ($the_query->have_posts() ): $the_query->the_post();
get_template_part( 'loop-templates/content', get_post_format() );
endwhile;
endif;
wp_reset_postdata();
}
?>