| Server IP : 14.225.204.176 / Your IP : 216.73.216.169 Web Server : nginx/1.24.0 System : Linux nodejs-ybgk 6.8.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024 x86_64 User : root ( 0) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/php/venus-cms/wp-content/themes/venus/ |
Upload File : |
<?php
/**
* Display page for the theme.
*
* @copyright ZiniMedia 2016
* @version Release: 0.1
* @package venus
* @author ZiniMedia-BM
*/
?>
<?php
get_header();
$currentID = get_the_ID();
$currentPost = get_post(get_the_ID());
?>
<!-- main-content -->
<main class="main-content" id="page-<?php echo get_the_ID(); ?>">
<section class="sub-banner">
<div class="sub-banner-img">
<?php
$topBg = get_field('top_background', $currentID);
if(!empty($topBg)) {
echo '<img src="'.$topBg['url'].'" alt="..." />';
} else {
?>
<img src="<?php echo get_theme_file_uri() ?>/assets/images/upload/banner-eyes.png" alt="..." />
<?php } ?>
</div>
<div class="container">
<div class="page-heading">
<?php
$parent = get_post_parent(get_the_ID());
if(empty($parent)) {
$parent = get_post(get_the_ID());
}
?>
<h1 class="title title-sz-1 text-primary-1 fw-bold"><?php echo $currentPost->post_title; ?></h1>
</div>
</div>
</section><!-- /.sub-banner -->
<div class="primary-content">
<div class="container">
<div class="row">
<div class="col-lg-8">
<article class="single-post">
<div class="post-body">
<?php echo $currentPost->post_content; ?>
</div>
</article>
</div><!--/.col-->
<div class="col-lg-4">
<div class="sidebar-right">
<div class="box-category-r mb-4">
<h3 class="box-category-r-title mb-3">Dịch vụ liên quan</h3>
<div class="list-view">
<?php
$child_posts = get_posts( array(
'post_parent' => $parent->ID,
'orderby' => 'menu_order',
'exclude' => array($currentID),
'post_type' => 'page' ) );
$expandedTab = false;
foreach ($child_posts as $chid_post) {
?>
<div class="categoty-item">
<div class="categoty-item-img">
<a href="<?php echo get_permalink($chid_post->ID); ?>">
<?php
if (has_post_thumbnail($chid_post->ID, "275x208")) {
echo get_the_post_thumbnail($chid_post->ID, 'large');
} ?>
</a>
</div>
<h3 class="categoty-item-title"><a href="#"><?php echo $chid_post->post_title; ?></a></h3>
</div>
<?php } ?>
</div>
</div><!-- /.box-category-r -->
<div class="box-category-r mb-4">
<h3 class="box-category-r-title mb-3">Tin tức liên quan</h3>
<div class="box-category-list-news mb-4">
<?php
$latestPost = get_posts(([
'post_type' => 'post',
'orderby' => 'date',
'order' => 'DESC',
'post_status' => 'publish',
'suppress_filters' => true,
]));
foreach ($latestPost as $post) {
?>
<div class="card card-vert">
<div class="card-img">
<a href="<?php echo get_permalink($post->ID); ?>">
<?php
if (has_post_thumbnail($post->ID, "275x208")) {
the_post_thumbnail($post->ID, "275x208");
} ?>
</a>
</div>
<div class="card-body">
<h3 class="card-title">
<a href="<?php echo get_permalink($post->ID); ?>"><?php echo $post->post_title; ?></a>
</h3>
<div class="card-meta"><i class="fa fa-clock"></i> <?php echo get_the_date('',$post->ID) ?></div>
</div>
</div>
<?php } ?>
</div>
</div><!-- /.box-category-r -->
<div class="banner-img">
<a href="#"><img src="<?php echo get_theme_file_uri() ?>/assets/images/upload/banner-img-1.jpg" alt=""/></a>
</div>
</div>
</div><!--/.col-->
</div>
</div>
</div>
</main>
<!-- e: main-content -->
<?php get_footer(); ?>