HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wpskycap/wp-content/themes/sway/single.php
<?php
/**
 * The Template for displaying all single posts.
 * @package sway
 * by KeyDesign
 */

	if ( ! defined( 'ABSPATH' ) ) {
		exit; // Exit if accessed directly.
	}

	get_header();

	$page_layout = $single_post_template = $sticky_sidebar = $post_header_image = $post_image_class = $blog_active_widgets = $blog_single_sidebar = '';

	if ( has_post_thumbnail( $post->ID ) ) {
		$post_header_image = wp_get_attachment_url( get_post_thumbnail_id(get_option($post->ID)), 'full' );
	}

	if ( $post_header_image != '' ) {
		$post_image_class = 'post-with-image';
	}

	$blog_single_sidebar = sway_get_option( 'tek-blog-single-sidebar' );

	if ( '' == $blog_single_sidebar ) {
		$blog_single_sidebar = 1;
	}

	$blog_active_widgets = is_active_sidebar( 'blog-sidebar' );

	if ( ! $blog_active_widgets ) {
		$blog_single_sidebar = 0;
	}

	if ( sway_get_option( 'tek-blog-sticky-sidebar' ) ) {
		$sticky_sidebar = 'post-sticky-sidebar';
	}

	if ( $blog_single_sidebar ) {
		$page_layout .= "use-sidebar";
	}

	if ( '' != sway_get_option( 'tek-single-post-template' ) && is_singular('post')) {
		$single_post_template = sway_get_option( 'tek-single-post-template' );
	} else {
		$single_post_template = 'single-post-layout-one';
	}
?>

<div id="posts-content" class="blog-single <?php echo esc_attr( $page_layout ); ?>">
	<?php while ( have_posts() ) : the_post(); ?>
		<?php if ( ($single_post_template == 'single-post-layout-two') && $post_header_image != '' ) : ?>
			<div class="blog-single-header-wrapper <?php echo esc_attr($post_image_class); ?>" style="background-image:url('<?php echo esc_url($post_header_image); ?>')">
		<?php else: ?>
			<div class="blog-single-header-wrapper">
		<?php endif; ?>
			<div class="container blog-single-title-meta-wrapper">
				<?php if ($single_post_template == 'single-post-layout-one') : ?>
					<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8 layout-one-title">
				<?php else: ?>
					<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
				<?php endif; ?>
					<?php get_template_part( 'core/templates/post/partials/content', 'title' );
					get_template_part( 'core/templates/post/partials/content', 'meta' ); ?>
				</div>
			</div>
		</div>

		<div class="container single-post-content">
			<div class="row">

				<?php if ( $blog_single_sidebar ) { ?>
					<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
				<?php } else { ?>
					<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8 BlogFullWidth">
				<?php } ?>
					<?php if ($single_post_template == 'single-post-layout-one') {
						get_template_part( 'core/templates/post/post-type/content', get_post_format() );
					} ?>
					<?php get_template_part( 'core/templates/post/content', 'single' ); ?>

					</div>

					<?php if ( $blog_single_sidebar ) { ?>
						<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 <?php echo esc_attr( $sticky_sidebar ); ?>">
							<div class="right-sidebar">
								<?php get_sidebar(); ?>
							</div>
						</div>
					<?php } ?>
				</div>
			</div>

			<?php
			if ( sway_get_option( 'tek-related-posts' ) == true )  {
				get_template_part( 'core/templates/post/partials/content', 'related' );
			}

			endwhile; // End of the loop.
			?>

</div>

<?php get_footer(); ?>