| Server IP : 51.91.236.193 / Your IP : 216.73.216.224 Web Server : Apache System : Linux webm010.cluster128.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : institutah ( 16501) PHP Version : 7.2.34 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/institutah/www/wp-content/themes/makali/ |
Upload File : |
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* For example, it puts together the home page when no home.php file exists.
*
* @link http://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Makali_Theme
* @since Makali 1.0
*/
$makali_opt = get_option( 'makali_opt' );
get_header();
$makali_bloglayout = 'sidebar';
if(isset($makali_opt['blog_layout']) && $makali_opt['blog_layout']!=''){
$makali_bloglayout = $makali_opt['blog_layout'];
}
if(isset($_GET['layout']) && $_GET['layout']!=''){
$makali_bloglayout = $_GET['layout'];
}
$makali_blogsidebar = 'right';
if(isset($makali_opt['sidebarblog_pos']) && $makali_opt['sidebarblog_pos']!=''){
$makali_blogsidebar = $makali_opt['sidebarblog_pos'];
}
if(isset($_GET['sidebar']) && $_GET['sidebar']!=''){
$makali_blogsidebar = $_GET['sidebar'];
}
if ( !is_active_sidebar( 'sidebar-1' ) ) {
$makali_bloglayout = 'nosidebar';
}
$makali_blog_main_extra_class = NULl;
if($makali_blogsidebar=='left') {
$makali_blog_main_extra_class = 'order-lg-last';
}
switch($makali_bloglayout) {
case 'sidebar':
$makali_blogclass = 'blog-sidebar';
$makali_blogcolclass = 9;
Makali_Class::makali_post_thumbnail_size('makali-post-thumb');
break;
case 'largeimage':
$makali_blogclass = 'blog-large';
$makali_blogcolclass = 9;
Makali_Class::makali_post_thumbnail_size('makali-post-thumbwide');
break;
case 'grid':
$makali_blogclass = 'grid';
$makali_blogcolclass = 9;
Makali_Class::makali_post_thumbnail_size('makali-post-thumbwide');
break;
default:
$makali_blogclass = 'blog-nosidebar';
$makali_blogcolclass = 12;
$makali_blogsidebar = 'none';
Makali_Class::makali_post_thumbnail_size('makali-post-thumb');
}
?>
<div class="main-container">
<div class="breadcrumb-container">
<div class="container">
<?php Makali_Class::makali_breadcrumb(); ?>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-12 <?php echo 'col-lg-'.$makali_blogcolclass; ?> <?php echo esc_attr($makali_blog_main_extra_class);?>">
<div class="blog-page blogs <?php echo esc_attr($makali_blogclass); if($makali_blogsidebar=='left') {echo ' left-sidebar'; } if($makali_blogsidebar=='right') {echo ' right-sidebar'; } ?>">
<header class="entry-header">
<h1 class="entry-title"><?php if(isset($makali_opt) && ($makali_opt !='')) { echo esc_html($makali_opt['blog_header_text']); } else { esc_html_e('Blog', 'makali');} ?></h1>
</header>
<div class="blog-wrapper">
<?php if ( have_posts() ) : ?>
<div class="post-container">
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
</div>
<?php Makali_Class::makali_pagination(); ?>
<?php else : ?>
<article id="post-0" class="post no-results not-found">
<?php if ( current_user_can( 'edit_posts' ) ) :
// Show a different message to a logged-in user who can add posts.
?>
<header class="entry-header">
<h1 class="entry-title"><?php esc_html_e( 'No posts to display', 'makali' ); ?></h1>
</header>
<div class="entry-content">
<p><?php printf( wp_kses(__( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'makali' ), array('a'=>array('href'=>array()))), admin_url( 'post-new.php' ) ); ?></p>
</div><!-- .entry-content -->
<?php else :
// Show the default message to everyone else.
?>
<header class="entry-header">
<h1 class="entry-title"><?php esc_html_e( 'Nothing Found', 'makali' ); ?></h1>
</header>
<div class="entry-content">
<p><?php esc_html_e( 'Apologies, but no results were found. Perhaps searching will help find a related post.', 'makali' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
<?php endif; // end current_user_can() check ?>
</article><!-- #post-0 -->
<?php endif; // end have_posts() check ?>
</div>
</div>
</div>
<?php if($makali_bloglayout!='nosidebar' && is_active_sidebar('sidebar-1')): ?>
<?php get_sidebar(); ?>
<?php endif; ?>
</div>
</div>
<!-- brand logo -->
<?php
if(isset($makali_opt['inner_brand']) && function_exists('makali_brands_shortcode') && shortcode_exists( 'ourbrands' ) ){
if($makali_opt['inner_brand'] && isset($makali_opt['brand_logos'][0]) && $makali_opt['brand_logos'][0]['thumb']!=null) { ?>
<div class="inner-brands">
<div class="container">
<?php if(isset($makali_opt['inner_brand_title']) && $makali_opt['inner_brand_title']!=''){ ?>
<div class="title">
<h3><?php echo esc_html( $makali_opt['inner_brand_title'] ); ?></h3>
</div>
<?php } ?>
<?php echo do_shortcode('[ourbrands]'); ?>
</div>
</div>
<?php }
}
?>
<!-- end brand logo -->
</div>
<?php get_footer(); ?>