HEX
Server: nginx/1.15.10
System: Linux vps240vn 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User: (1000)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/vietktv.vn/wp-content/themes/binhvu.off/single.php
<?php get_header(); ?>
<div id="single-tmp" class="site-main-wrapper page-wrapper has-left-sidebar">
	<div class="container">	
		<div class="row row-collapse">
			<div class="col hidden-xs col-sm-4 col-md-3 main-sidebar">
				<?php get_sidebar();?>
			</div>
			<div class="col-xs-12 col-sm-8 col-md-9 main content">
				<main class="site-main"> 
					<section  class="singular-content">
						<?php if (have_posts()): the_post() ; ?>
							<h6 class="entry-category is-xsmall">
								<?php
								   	global $post;
								    	$postcat = get_the_category( $post->ID );
								    	if ( ! empty( $postcat ) ) {
								        	echo esc_html( $postcat[0]->name );   
								    	}
								   	?>
							</h6>
							<header class="section-header tmp-title-bar tmp-title-bar-sg  clearfix">
								<h1 class="title"><?php the_title();?></h1>
							</header>
							<div class="entry-divider is-divider small"></div>
							<div class="section-main  clearfix">
								<?php the_content();?>
							</div>
						<?php endif;?>
					</section>
					<nav class="nav-single">
						 <span class="nav-previous">
						 <?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr; TRƯỚC', 'Previous post link', '' ) . '</span> %title' ); ?>
						 </span>
						 <span class="nav-next">
						 <?php next_post_link( '%link', '<span class="meta-nav">' . _x( 'SAU &rarr;', 'Next post link', '' ) . '</span> %title' ); ?>
						 </span>
					</nav><!-- .nav-single -->
					<?php
		    		 $categories = get_the_category($post->ID);
		       		 if ($categories) :       
		            $category_ids = array();
		            foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
		            $args=array(
		            'category__in' => $category_ids,
		            'post__not_in' => array($post->ID),
		            'showposts'=>12,
		            'ignore_sticky_posts' => 1
		            );
		            $related = new wp_query($args);
		            if( $related->have_posts() ) :?>
		            <section class="single-related-posts">
		           			<header class="section-header  related-title-bar clearfix">
		           				<span class="title">Bài viết khác</span>
		           			</header>
		            		<div class="section-main">
		            			<ul> <?php   while ($related->have_posts()) :  $related->the_post(); ?>
		                  			<li><a href="<?php the_permalink();?>"><?php the_title();?></a></li>                    
			      				<?php  endwhile;?></ul>
			       			</div>
			     	</section>
			        <?php endif ;?> 
			         <?php endif ;?> 
				</main>
			</div>
		</div>
	</div>	
</div>
<?php get_footer(); ?>