HEX
Server: LiteSpeed
System: Linux server315.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: globfdxw (6114)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //home/globfdxw/diasporameetsafrica.com/wp-content/themes/lavelo/single.php
<?php
/*
 * The template for displaying all single posts.
 * Author & Copyright: wpoceans
 * URL: http://themeforest.net/user/wpoceans
 */
get_header();
// Metabox
$lavelo_id    = ( isset( $post ) ) ? $post->ID : 0;
$lavelo_id    = ( is_home() ) ? get_option( 'page_for_posts' ) : $lavelo_id;
$lavelo_meta  = get_post_meta( $lavelo_id, 'page_type_metabox', true );
if ( $lavelo_meta ) {
	$lavelo_content_padding = $lavelo_meta['content_spacings'];
} else { $lavelo_content_padding = ''; }
// Padding - Metabox
if ( $lavelo_content_padding && $lavelo_content_padding !== 'padding-default' ) {
	$lavelo_content_top_spacings = $lavelo_meta['content_top_spacings'];
	$lavelo_content_bottom_spacings = $lavelo_meta['content_bottom_spacings'];
	if ( $lavelo_content_padding === 'padding-custom' ) {
		$lavelo_content_top_spacings = $lavelo_content_top_spacings ? 'padding-top:'. lavelo_check_px($lavelo_content_top_spacings) .';' : '';
		$lavelo_content_bottom_spacings = $lavelo_content_bottom_spacings ? 'padding-bottom:'. lavelo_check_px($lavelo_content_bottom_spacings) .';' : '';
		$lavelo_custom_padding = $lavelo_content_top_spacings . $lavelo_content_bottom_spacings;
	} else {
		$lavelo_custom_padding = '';
	}
} else {
	$lavelo_custom_padding = '';
}
// Theme Options
$lavelo_sidebar_position = cs_get_option( 'single_sidebar_position' );
$lavelo_service_widget = cs_get_option( 'single_service_widget' );
$lavelo_service_widget = $lavelo_service_widget ? $lavelo_service_widget : 'sidebar-1';

$lavelo_single_comment = cs_get_option( 'single_comment_form' );
$lavelo_sidebar_position = $lavelo_sidebar_position ? $lavelo_sidebar_position : 'sidebar-right';
// Sidebar Position
if ( $lavelo_sidebar_position === 'sidebar-hide' ) {
	$lavelo_layout_class = 'col-md-12';
	$lavelo_sidebar_class = 'hide-sidebar';
} elseif ( $lavelo_sidebar_position === 'sidebar-left' && is_active_sidebar( $lavelo_service_widget ) ) {
	$lavelo_layout_class = 'col-md-8 col-md-push-4';
	$lavelo_sidebar_class = 'left-sidebar';
} elseif( is_active_sidebar( $lavelo_service_widget ) ) {
	$lavelo_layout_class = 'col-md-8';
	$lavelo_sidebar_class = 'right-sidebar';
} else {
	$lavelo_layout_class = 'col-md-12';
	$lavelo_sidebar_class = 'hide-sidebar';
} ?>
<div class="blog-single-section section-padding <?php echo esc_attr( $lavelo_content_padding .' '. $lavelo_sidebar_class ); ?>" style="<?php echo esc_attr( $lavelo_custom_padding ); ?>">
	<div class="container content-area ">
		<div class="row">
			<div class="single-content-wrap <?php echo esc_attr( $lavelo_layout_class ); ?>">
				<div class="blog-content">
					<?php
					if ( have_posts() ) :
						/* Start the Loop */
						while ( have_posts() ) : the_post();
							if ( post_password_required() ) {
									echo '<div class="password-form">'.get_the_password_form().'</div>';
								} else {
									get_template_part( 'theme-layouts/post/content', 'single' );
									$lavelo_single_comment = !$lavelo_single_comment ? comments_template() : '';

								}
						endwhile;
					else :
						get_template_part( 'theme-layouts/post/content', 'none' );
					endif; ?>
				</div><!-- Blog Div -->
				<?php
		    lavelo_paging_nav();
		    wp_reset_postdata(); ?>
			</div><!-- Content Area -->
				<?php
				if ( $lavelo_sidebar_position !== 'sidebar-hide' && is_active_sidebar( $lavelo_service_widget ) ) {
					get_sidebar(); // Sidebar
				} ?>
		</div>
	</div>
</div>
<?php
get_footer();