function kt_get_logo()
 {
     $default = kt_get_post_meta(get_the_ID(), 'kt_page_logo', '');
     if (!$default) {
         $default = kt_option("kt_logo", apply_filters('kt_site_logo_default', get_template_directory_uri() . '/images/logo.png'));
     }
     $html = '<a href="' . esc_url(get_home_url()) . '"><img alt="' . esc_attr(get_bloginfo('name')) . '" src="' . esc_url($default) . '" class="_rw" /></a>';
     echo apply_filters('kt_site_logo', $html);
 }
Example #2
0
<?php

/**
 * The sidebar containing the main widget area
 *
 * @package WordPress
 * @subpackage Kute theme
 * @since KuteTheme 1.0
 */
$kt_used_sidebar = kt_option('kt_used_sidebar', 'sidebar-primary');
if (is_page()) {
    $kt_page_used_sidebar = kt_get_post_meta(get_the_ID(), 'kt_page_used_sidebar', 'none');
    if ($kt_page_used_sidebar != "none") {
        $kt_used_sidebar = $kt_page_used_sidebar;
    }
}
?>

<div id="secondary" class="secondary">
	<?php 
if (is_active_sidebar($kt_used_sidebar)) {
    ?>
		<div id="widget-area" class="widget-area" role="complementary">
			<?php 
    dynamic_sidebar($kt_used_sidebar);
    ?>
		</div><!-- .widget-area -->
	<?php 
}
?>
</div><!-- .secondary -->
 /**
  * @see Walker::start_el()
  * @since 3.0.0
  *
  * @param string $output Passed by reference. Used to append additional content.
  * @param object $item Menu item data object.
  * @param int $depth Depth of menu item. Used for padding.
  * @param int $current_page Menu item ID.
  * @param object $args
  */
 public function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0)
 {
     $indent = $depth ? str_repeat("\t", $depth) : '';
     $this->megamenu_enable = get_post_meta($item->ID, '_menu_item_megamenu_enable', true);
     $this->megamenu_menu_page = get_post_meta($item->ID, '_menu_item_megamenu_menu_page', true);
     $this->megamenu_img_icon = get_post_meta($item->ID, '_menu_item_megamenu_img_icon', true);
     /**
      * Dividers, Headers or Disabled
      * =============================
      * Determine whether the item is a Divider, Header, Disabled or regular
      * menu item. To prevent errors we use the strcasecmp() function to so a
      * comparison that is not case sensitive. The strcasecmp() function returns
      * a 0 if the strings are equal.
      */
     if (strcasecmp($item->attr_title, 'divider') == 0 && $depth === 1) {
         $output .= $indent . '<li role="presentation" class="divider">';
     } else {
         if (strcasecmp($item->title, 'divider') == 0 && $depth === 1) {
             $output .= $indent . '<li role="presentation" class="divider">';
         } else {
             if (strcasecmp($item->attr_title, 'dropdown-header') == 0 && $depth === 1) {
                 $output .= $indent . '<li role="presentation" class="dropdown-header">' . esc_attr($item->title);
             } else {
                 if (strcasecmp($item->attr_title, 'disabled') == 0) {
                     $output .= $indent . '<li role="presentation" class="disabled"><a href="#">' . esc_attr($item->title) . '</a>';
                 } else {
                     $class_names = $value = '';
                     $classes = empty($item->classes) ? array() : (array) $item->classes;
                     $classes[] = 'menu-item-' . $item->ID;
                     $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item, $args));
                     if ($args->has_children) {
                         $class_names .= ' menu-item-has-children';
                     }
                     if ($this->megamenu_enable) {
                         $class_names .= ' menu-item-has-children item-megamenu';
                     }
                     if (in_array('current-menu-item', $classes)) {
                         $class_names .= ' active';
                     }
                     $class_names = $class_names ? ' class="' . esc_attr($class_names) . '"' : '';
                     $id = apply_filters('nav_menu_item_id', 'menu-item-' . $item->ID, $item, $args);
                     $id = $id ? ' id="' . esc_attr($id) . '"' : '';
                     $output .= $indent . '<li' . $id . $value . $class_names . '>';
                     $atts = array();
                     $atts['title'] = !empty($item->title) ? $item->title : '';
                     $atts['target'] = !empty($item->target) ? $item->target : '';
                     $atts['rel'] = !empty($item->xfn) ? $item->xfn : '';
                     // If item has_children add atts to a.
                     if ($args->has_children && $depth === 0) {
                         $atts['href'] = !empty($item->url) ? $item->url : '';
                     } else {
                         $atts['href'] = !empty($item->url) ? $item->url : '';
                     }
                     $atts = apply_filters('nav_menu_link_attributes', $atts, $item, $args);
                     $attributes = '';
                     foreach ($atts as $attr => $value) {
                         if (!empty($value)) {
                             $value = 'href' === $attr ? esc_url($value) : esc_attr($value);
                             $attributes .= ' ' . $attr . '="' . $value . '"';
                         }
                     }
                     $item_output = $args->before;
                     /*
                      * Glyphicons
                      * ===========
                      * Since the the menu item is NOT a Divider or Header we check the see
                      * if there is a value in the attr_title property. If the attr_title
                      * property is NOT null we apply it as the class name for the glyphicon.
                      */
                     if (!empty($item->attr_title)) {
                         $item_output .= '<a' . $attributes . '><span class="glyphicon ' . esc_attr($item->attr_title) . '"></span>&nbsp;';
                     } else {
                         $item_output .= '<a' . $attributes . '>';
                     }
                     if ($this->megamenu_img_icon) {
                         $imgicon = wp_get_attachment_image(intval($this->megamenu_img_icon), 'full');
                         if ($imgicon) {
                             //$imgicon = '<img src="' . esc_url( $file ) . '" alt="' . esc_attr( $item->title ) . '" title="' . esc_attr( $item->title ) . '" />';
                             $item_output .= $imgicon;
                         }
                     }
                     $item_output .= $args->link_before . apply_filters('the_title', $item->title, $item->ID) . $args->link_after;
                     $item_output .= '</a>';
                     $item_output .= $args->after;
                     if ($this->megamenu_enable && $this->megamenu_menu_page) {
                         $menu_with = kt_get_post_meta($this->megamenu_menu_page, 'kt_megamenu_width', 830);
                         if (post_type_exists('megamenu')) {
                             $megamenu_item = get_post($this->megamenu_menu_page);
                         } else {
                             $megamenu_item = get_post($this->megamenu_menu_page);
                         }
                         $item_output .= '<div style="width:' . intval($menu_with) . 'px" class="sub-menu megamenu menu_page mega-menu-' . intval($depth) . ' p-' . $this->megamenu_menu_page . '">' . do_shortcode($megamenu_item->post_content) . '</div>';
                     }
                     $output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
                 }
             }
         }
     }
 }
Example #4
0
<?php

$kt_used_header = kt_get_post_meta(get_the_ID(), 'kt_page_header', '');
if (!$kt_used_header) {
    $kt_used_header = kt_option('kt_used_header', 1);
}
?>

<?php 
if ($kt_used_header == 2 || $kt_used_header == 5 || $kt_used_header == 6) {
    ?>
    <form method="get" action="<?php 
    echo esc_url(home_url('/'));
    ?>
" class="box-search show-icon">
        <?php 
    if (kt_is_wc()) {
        ?>
            <input type="hidden" name="post_type" value="product" />
        <?php 
    }
    ?>
		<span class="icon"><span class="pe-7s-search"></span></span>
		<div class="inner">
			<input class="search" value="<?php 
    echo esc_attr(get_search_query());
    ?>
" type="text" name="s"  placeholder="<?php 
    esc_attr_e('Search here...', 'kute-boutique');
    ?>
" />
Example #5
0
<?php

/**
 * The template used for displaying page content
 *
 * @package WordPress
 * @subpackage Kute Theme
 * @since KuteTheme 1.0
 */
$kt_page_comment = kt_get_post_meta(get_the_ID(), 'kt_enable_page_comment', 'show');
$kt_show_page_title = kt_get_post_meta(get_the_ID(), 'kt_show_page_title', 'show');
$kt_page_extra_class = kt_get_post_meta(get_the_ID(), 'kt_page_extra_class', 'show');
?>
<article id="post-<?php 
the_ID();
?>
" <?php 
post_class($kt_page_extra_class);
?>
>
    <?php 
if ($kt_show_page_title == 'show') {
    ?>
    	<header class="entry-header">
        	<h1 class="page-heading">
                <span class="page-heading-title2"><?php 
    the_title();
    ?>
</span>
            </h1>
        </header>
Example #6
0
 *
 * @package KuteTheme
 * @subpackage Kute_Theme
 * @since KuteTheme 1.0
 */
get_header();
// Start the loop.
while (have_posts()) {
    the_post();
    $id = get_the_ID();
}
// Default option
$kt_sidebar_are = kt_option('kt_sidebar_are', 'left');
// Page option
$kt_page_layout = kt_get_post_meta($id, 'kt_page_layout', '');
$kt_show_page_breadcrumb = kt_get_post_meta($id, 'kt_show_page_breadcrumb', 'show');
if ($kt_page_layout != "") {
    $kt_sidebar_are = $kt_page_layout;
}
$sidebar_are_layout = 'sidebar-' . $kt_sidebar_are;
if ($kt_sidebar_are == "left" || $kt_sidebar_are == "right") {
    $col_class = "main-content col-xs-12 col-sm-8 col-md-9";
} else {
    $col_class = "main-content page-full-width col-sm-12";
}
?>
<div id="primary" class="content-area <?php 
echo esc_attr($sidebar_are_layout);
?>
">
	<main id="main" class="site-main">
Example #7
0
<?php

get_header();
// Default  layout
$kt_blog_layout = kt_option('kt_blog_layout', 'left');
// Page options
$kt_page_extra_class = kt_get_post_meta(get_the_ID(), 'kt_page_extra_class', '');
$kt_page_layout = kt_get_post_meta(get_the_ID(), 'kt_page_layout', '');
$kt_show_page_title = kt_get_post_meta(get_the_ID(), 'kt_show_page_title', 'show');
if ($kt_page_layout != "") {
    $kt_blog_layout = $kt_page_layout;
}
// Main container class
$main_container_class = array();
$main_container_class[] = $kt_page_extra_class;
$main_container_class[] = 'main-container';
if ($kt_blog_layout == 'full') {
    $main_container_class[] = 'no-sidebar';
} else {
    $main_container_class[] = $kt_blog_layout . '-slidebar';
}
$main_content_class = array();
$main_content_class[] = 'main-content';
if ($kt_blog_layout == 'full') {
    $main_content_class[] = 'col-sm-12';
} else {
    $main_content_class[] = 'col-md-9 col-sm-8';
}
$slidebar_class = array();
$slidebar_class[] = 'sidebar';
if ($kt_blog_layout != 'full') {