function kopa_head() { // Logo margin $logo_style = ''; $logo_top_margin = kopa_get_option('kopa_theme_options_logo_margin_top'); $logo_bottom_margin = kopa_get_option('kopa_theme_options_logo_margin_bottom'); $logo_left_margin = kopa_get_option('kopa_theme_options_logo_margin_left'); $logo_right_margin = kopa_get_option('kopa_theme_options_logo_margin_right'); $logo_margin = ''; if ($logo_top_margin) { $logo_margin .= 'margin-top:' . $logo_top_margin . 'px;'; } if ($logo_bottom_margin) { $logo_margin .= 'margin-bottom:' . $logo_bottom_margin . 'px;'; } if ($logo_left_margin) { $logo_margin .= 'margin-left:' . $logo_left_margin . 'px;'; } if ($logo_right_margin) { $logo_margin .= 'margin-right:' . $logo_right_margin . 'px;'; } if ($logo_margin) { $logo_style .= '#logo-image{' . $logo_margin . ' }'; } echo '<style type="text/css" id="kopa-theme-options-custom-styles">' . $logo_style . '</style>'; if (kopa_get_option('kopa_theme_options_custom_css')) { ?> <style type="text/css" id='kopa-user-custom-css'> <?php echo kopa_get_option('kopa_theme_options_custom_css'); ?> </style> <?php } }
<h1 class="site-title"><a href="<?php echo esc_url(home_url()); ?> "><?php bloginfo('name'); ?> </a></h1> </div><!--logo-image--> <?php if (kopa_get_option('kopa_theme_options_top_banner_url')) { ?> <div id="top-banner" class="pull-right"> <?php echo htmlspecialchars_decode(kopa_get_option('kopa_theme_options_top_banner_url')); ?> </div> <?php } ?> <div class="clear"></div> </div> <!-- header-middle --> <div id="nav"> <div id="logo" style="float: left;padding: 0; height: 48px;width: 280px;"> <a href="/"><img style="height: 55px;width: 280px;" src="http://mynotebook/wp-content/uploads/2015/11/logo.png" alt="Logotip"></a></div> <div id="header-bottom"> <div id="header-bottom-inner"> <nav id="main-nav" class="pull-left">
<?php $kopa_setting = kopa_get_template_setting(); $sidebars = $kopa_setting['sidebars']; $total = count($sidebars); $footer_sidebar[0] = $kopa_setting ? $sidebars[$total - 4] : 'sidebar_3'; $footer_sidebar[1] = $kopa_setting ? $sidebars[$total - 3] : 'sidebar_4'; $footer_sidebar[2] = $kopa_setting ? $sidebars[$total - 2] : 'sidebar_5'; $footer_sidebar[3] = $kopa_setting ? $sidebars[$total - 1] : 'sidebar_6'; $kopa_custom_footer_description = kopa_get_option('kopa_theme_options_copyright'); ?> <?php if (is_active_sidebar($footer_sidebar[0]) || is_active_sidebar($footer_sidebar[1]) || is_active_sidebar($footer_sidebar[2]) || is_active_sidebar($footer_sidebar[3])) { ?> <div id="bottom-sidebar"> <div class="wrapper"> <div class="row-fluid"> <div class="span12 clearfix"> <div class="l-col"> <div class="r-color"></div> <div class="row-fluid"> <div class="span4 widget-area-8"> <?php if (is_active_sidebar($footer_sidebar[0])) { dynamic_sidebar($footer_sidebar[0]); } ?> </div><!--span4--> <div class="span4 widget-area-9">
<?php echo KopaIcon::getIcon('hand-right'); ?> <span class="kopa-section-title"><?php _e('Footer', kopa_get_domain()); ?> </span> </div><!--kopa-box-head--> <div class="kopa-box-body"> <div class="kopa-element-box kopa-theme-options"> <span class="kopa-component-title"><?php _e('Custom Left Footer', kopa_get_domain()); ?> </span> <p class="kopa-desc"><?php _e('Enter the content you want to display in your left footer (e.g. copyright text).', kopa_get_domain()); ?> </p> <textarea class="" rows="6" id="kopa_setting_copyrights" name="kopa_theme_options[kopa_theme_options_copyright]"><?php echo htmlspecialchars_decode(stripslashes(kopa_get_option('kopa_theme_options_copyright'))); ?> </textarea> </div><!--kopa-element-box--> </div> </div><!--kopa-content-box-->
<div class="kopa-element-box kopa-theme-options"> <span class="kopa-component-title"><?php _e('Twitter URL', kopa_get_domain()); ?> </span> <input type="url" value="<?php echo esc_attr(kopa_get_option('kopa_theme_options_social_links_twitter_url')); ?> " id="kopa_theme_options_social_links_twitter_url" name="kopa_theme_options[kopa_theme_options_social_links_twitter_url]"> </div> <!-- GOOGLE PLUS --> <div class="kopa-element-box kopa-theme-options"> <span class="kopa-component-title"><?php _e('Google Plus URL', kopa_get_domain()); ?> </span> <input type="url" value="<?php echo esc_attr(kopa_get_option('kopa_theme_options_social_links_gplus_url')); ?> " id="kopa_theme_options_social_links_gplus_url" name="kopa_theme_options[kopa_theme_options_social_links_gplus_url]"> </div> <p class="kopa-desc"><?php echo __('*Enter HIDE or leave blank to hide Facebook, Twitter or Google Plus link', kopa_get_domain()); ?> </p> </div> </div>
<div class="row-fluid"> <div class="span12 clearfix"> <div class="l-col widget-area-4"> <div class="r-color"></div> <h4 class="kp-headline-title"><?php echo kopa_get_option('kopa_theme_options_headline_title'); ?> <span><?php echo kopa_get_option('kopa_theme_options_headline_light_title'); ?> </span></h4> <div class="kp-headline clearfix"> <dl class="ticker-1 clearfix"> <?php $kopa_headline_category_id = (int) kopa_get_option('kopa_theme_options_headline_category_id'); $kopa_theme_options_headline_posts_number = (int) kopa_get_option('kopa_theme_options_headline_posts_number'); if ($kopa_theme_options_headline_posts_number <= 1) { $kopa_theme_options_headline_posts_number = 10; } $kopa_headline_posts = new WP_Query(array('cat' => $kopa_headline_category_id, 'posts_per_page' => $kopa_theme_options_headline_posts_number)); if ($kopa_headline_posts->have_posts()) { while ($kopa_headline_posts->have_posts()) { $kopa_headline_posts->the_post(); echo '<dd><a href="' . get_permalink() . '">' . get_the_title() . '</a></dd>'; } } wp_reset_postdata(); ?> </dl> <!--ticker-1--> </div>
<?php if (kopa_get_option('kopa_theme_options_apple_iphone_retina_icon_url')) { ?> <link rel="apple-touch-icon" sizes="114x114" href="<?php echo kopa_get_option('kopa_theme_options_apple_iphone_retina_icon_url'); ?> "> <?php } ?> <?php if (kopa_get_option('kopa_theme_options_apple_ipad_retina_icon_url')) { ?> <link rel="apple-touch-icon" sizes="144x144" href="<?php echo kopa_get_option('kopa_theme_options_apple_ipad_retina_icon_url'); ?> "> <?php } ?> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script> <script src="<?php echo get_template_directory_uri(); ?> /js/PIE_IE678.js"></script> <![endif]-->
<div id="tab-custom-css" class="kopa-content-box tab-content tab-content-1"> <div class="kopa-box-head"> <?php echo KopaIcon::getIcon('hand-right'); ?> <span class="kopa-section-title"><?php _e('Custom CSS', kopa_get_domain()); ?> </span> </div><!--kopa-box-head--> <div class="kopa-box-body"> <div class="kopa-element-box kopa-theme-options"> <p class="kopa-desc"><?php _e('Enter the your custom CSS code', kopa_get_domain()); ?> </p> <textarea class="" rows="10" id="kopa_custom_css" name="kopa_theme_options[kopa_theme_options_custom_css]"><?php echo esc_html(esc_textarea(kopa_get_option('kopa_theme_options_custom_css'))); ?> </textarea> </div><!--kopa-element-box--> </div><!--tab-theme-skin--> </div><!--tab-container-->
<div class="kopa-element-box kopa-theme-options"> <span class="kopa-component-title"><?php _e('Get By', kopa_get_domain()); ?> </span> <select class="" id="kopa_theme_options_post_related_get_by" name="kopa_theme_options[kopa_theme_options_post_related_get_by]"> <?php $post_related_get_by = array('hide' => __('-- Hide --', kopa_get_domain()), 'post_tag' => __('Tag', kopa_get_domain()), 'category' => __('Category', kopa_get_domain())); foreach ($post_related_get_by as $value => $title) { printf('<option value="%1$s" %3$s>%2$s</option>', $value, $title, $value == kopa_get_option('kopa_theme_options_post_related_get_by') ? 'selected="selected"' : ''); } ?> </select> </div> <div class="kopa-element-box kopa-theme-options"> <span class="kopa-component-title"><?php _e('Limit', kopa_get_domain()); ?> </span> <input type="number" value="<?php echo kopa_get_option('kopa_theme_options_post_related_limit'); ?> " id="kopa_theme_options_post_related_limit" name="kopa_theme_options[kopa_theme_options_post_related_limit]"> </div> </div><!--tab-theme-skin--> </div><!--tab-container-->
echo esc_attr(kopa_get_option('kopa_theme_options_social_links_twitter_url')); ?> " id="kopa_theme_options_social_links_twitter_url" name="kopa_theme_options[kopa_theme_options_social_links_twitter_url]"> </div> <!-- Flickr --> <div class="kopa-element-box kopa-theme-options"> <span class="kopa-component-title"><?php _e('Flickr URL', kopa_get_domain()); ?> </span> <input type="url" value="<?php echo esc_attr(kopa_get_option('kopa_theme_options_social_links_flickr_url')); ?> " id="kopa_theme_options_social_links_flickr_url" name="kopa_theme_options[kopa_theme_options_social_links_flickr_url]"> </div> <!-- Youtube --> <div class="kopa-element-box kopa-theme-options"> <span class="kopa-component-title"><?php _e('Youtube URL', kopa_get_domain()); ?> </span> <input type="url" value="<?php echo esc_attr(kopa_get_option('kopa_theme_options_social_links_youtube_url')); ?> " id="kopa_theme_options_social_links_youtube_url" name="kopa_theme_options[kopa_theme_options_social_links_youtube_url]"> </div> </div> </div>
function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); echo $before_widget; if (!empty($title)) { echo $before_title . $title . $after_title; } $dribbble_url = esc_url(kopa_get_option('kopa_theme_options_social_links_dribbble_url')); $gplus_url = esc_url(kopa_get_option('kopa_theme_options_social_links_gplus_url')); $facebook_url = esc_url(kopa_get_option('kopa_theme_options_social_links_facebook_url')); $twitter_url = esc_url(kopa_get_option('kopa_theme_options_social_links_twitter_url')); $rss_url = kopa_get_option('kopa_theme_options_social_links_rss_url'); $flickr_url = esc_url(kopa_get_option('kopa_theme_options_social_links_flickr_url')); $youtube_url = esc_url(kopa_get_option('kopa_theme_options_social_links_youtube_url')); $social_link_target = kopa_get_option('kopa_theme_options_social_link_target'); ?> <ul class="clearfix"> <!-- dribbble --> <?php if (!empty($dribbble_url)) { ?> <li><a href="<?php echo $dribbble_url; ?> " target="<?php echo $social_link_target; ?> "><?php echo KopaIcon::getIcon('dribbble'); ?> </a></li> <?php } ?> <!-- google plus --> <?php if (!empty($gplus_url)) { ?> <li><a href="<?php echo $gplus_url; ?> " target="<?php echo $social_link_target; ?> "><?php echo KopaIcon::getIcon('google-plus'); ?> </a></li> <?php } ?> <!-- facebook --> <?php if (!empty($facebook_url)) { ?> <li><a href="<?php echo $facebook_url; ?> " target="<?php echo $social_link_target; ?> "><?php echo KopaIcon::getIcon('facebook'); ?> </a></li> <?php } ?> <!-- twitter --> <?php if (!empty($twitter_url)) { ?> <li><a href="<?php echo $twitter_url; ?> " target="<?php echo $social_link_target; ?> "><?php echo KopaIcon::getIcon('twitter'); ?> </a></li> <?php } ?> <!-- rss --> <?php if ($rss_url != 'HIDE') { if (empty($rss_url)) { $rss_url = get_bloginfo('rss2_url'); } else { $rss_url = esc_url($rss_url); } ?> <li><a href="<?php echo $rss_url; ?> " target="<?php echo $social_link_target; ?> "><?php echo KopaIcon::getIcon('rss'); ?> </a></li> <?php } // endif ?> <!-- flickr --> <?php if (!empty($flickr_url)) { ?> <li><a href="<?php echo $flickr_url; ?> " target="<?php echo $social_link_target; ?> "><?php echo KopaIcon::getIcon('flickr'); ?> </a></li> <?php } ?> <!-- youtube --> <?php if (!empty($youtube_url)) { ?> <li><a href="<?php echo $youtube_url; ?> " target="<?php echo $social_link_target; ?> "><?php echo KopaIcon::getIcon('youtube'); ?> </a></li> <?php } ?> </ul> <?php echo $after_widget; }
<span class="kopa-section-title"><?php _e('Footer', kopa_get_domain()); ?> </span> </div><!--kopa-box-head--> <div class="kopa-box-body"> <div class="kopa-element-box kopa-theme-options"> <span class="kopa-component-title"><?php _e('Custom Footer', kopa_get_domain()); ?> </span> <p class="kopa-desc"><?php _e('Enter the content you want to display in your footer (e.g. copyright text).', kopa_get_domain()); ?> </p> <textarea class="" rows="6" id="kopa_setting_copyrights" name="kopa_theme_options[kopa_theme_options_copyright]"><?php echo esc_textarea(kopa_get_option('kopa_theme_options_copyright')); ?> </textarea> </div><!--kopa-element-box--> </div> </div><!--kopa-content-box-->
function kopa_add_icon_home_menu($items, $args) { if ('hide' == kopa_get_option('kopa_theme_options_home_menu_item_status')) { return $items; } if ($args->theme_location == 'main-nav') { if ($args->menu_id == 'toggle-view-menu') { $homelink = '<li class="clearfix"><h3><a href="' . esc_url(home_url('/')) . '">' . __('Home', kopa_get_domain()) . '</a></h3></li>'; $items = $homelink . $items; } else { if ($args->menu_id == 'main-menu') { $homelink = '<li class="menu-home-icon' . (is_front_page() ? ' current-menu-item' : '') . '"><a href="' . esc_url(home_url('/')) . '">' . __('Home', kopa_get_domain()) . '</a><span></span></li>'; $items = $homelink . $items; } } } return $items; }
function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); $temp = array('rss', 'twitter', 'facebook', 'gplus'); $socials = array(); foreach ($temp as $value) { $option = 'kopa_theme_options_social_links_' . $value . '_url'; $socials[$value] = kopa_get_option($option); } $location = $instance['location']; echo $before_widget; if (!empty($title)) { echo $before_title . $title . $after_title; } ?> <ul class="clearfix"> <?php if ($location == 'bottom') { foreach ($socials as $key => $value) { if ($value == 'HIDE') { continue; } if ($value == '') { if ($key == 'rss') { ?> <li><a href="<?php echo bloginfo('rss2_url'); ?> " class="fa fa-<?php echo $key; ?> "></a></li> <?php continue; } else { continue; } } ?> <?php if ($key != 'gplus') { ?> <li><a href="<?php echo esc_url($value); ?> " class="fa fa-<?php echo $key; ?> "></a></li> <?php continue; } ?> <?php if ($key == 'gplus') { ?> <li><a href="<?php echo esc_url($value); ?> " class="fa fa-google-plus"></a></li> <?php continue; } ?> <?php } } else { foreach ($socials as $key => $value) { if ($value == 'HIDE') { continue; } if ($value == '') { if ($key == 'rss') { ?> <li class ="<?php echo $key; ?> -icon text-center"><a href="<?php echo bloginfo('rss2_url'); ?> " class="fa fa-<?php echo $key; ?> "></a></li> <?php continue; } else { continue; } } ?> <?php if ($key != 'gplus') { ?> <li class ="<?php echo $key; ?> -icon text-center"><a href="<?php echo esc_url($value); ?> " class="fa fa-<?php echo $key; ?> "></a></li> <?php continue; } ?> <?php if ($key == 'gplus') { ?> <li class ="<?php echo $key; ?> -icon text-center"><a href="<?php echo esc_url($value); ?> " class="fa fa-google-plus"></a></li> <?php continue; } ?> <?php } } ?> </ul> <?php echo $after_widget; }
<?php if (have_posts()) { while (have_posts()) { the_post(); kopa_breadcrumb(); get_template_part('format-single', get_post_format()); //author $about_author = kopa_get_option('kopa_theme_options_post_about_author'); if ($about_author == 'show') { kopa_about_author(); } //related kopa_get_related_articles(); //comment comments_template(); } }
<!-- page-links --> <?php if (get_the_tags()) { ?> <div class="tag-box pull-left"> <span><?php echo __('Tagged with:', kopa_get_domain()); ?> </span> <?php the_tags('', ', ', ''); ?> </div> <?php } ?> <div class="clear"></div> <?php $post_link = kopa_get_option('kopa_theme_options_post_link'); ?> <?php if ($post_link == 'show') { kopa_post_navigation(); } ?> </div>
?> </span> <?php if (comments_open()) { ?> <span class="entry-comments"><?php echo KopaIcon::getIcon('comment', 'span'); comments_popup_link('0', '1', '%'); ?> </span> <?php } ?> <?php $kopa_total_view = get_post_meta(get_the_ID(), 'kopa_' . kopa_get_domain() . '_total_view', true); if ('show' == kopa_get_option('kopa_theme_options_view_count_status') && $kopa_total_view) { ?> <span class="entry-view"><?php echo KopaIcon::getIcon('view', 'span'); echo $kopa_total_view; ?> </span> <?php } // endif ?> </div> <!-- meta-box --> <div class="clear"></div> </div>
<div class="kopa-box-body"> <div class="kopa-element-box kopa-theme-options"> <span class="kopa-component-title"><?php _e('Get By', kopa_get_domain()); ?> </span> <select class="" id="kopa_theme_options_post_related_get_by" name="kopa_theme_options[kopa_theme_options_post_related_get_by]"> <?php $post_related_get_by = array('hide' => __('-- Hide --', kopa_get_domain()), 'post_tag' => __('Tag', kopa_get_domain()), 'category' => __('Category', kopa_get_domain())); foreach ($post_related_get_by as $value => $title) { printf('<option value="%1$s" %3$s>%2$s</option>', $value, $title, $value == kopa_get_option('kopa_theme_options_post_related_get_by') ? 'selected="selected"' : ''); } ?> </select> </div> <div class="kopa-element-box kopa-theme-options"> <span class="kopa-component-title"><?php _e('Limit', kopa_get_domain()); ?> </span> <input type="number" value="<?php echo esc_attr(kopa_get_option('kopa_theme_options_post_related_limit')); ?> " id="kopa_theme_options_post_related_limit" name="kopa_theme_options[kopa_theme_options_post_related_limit]"> </div> </div><!--tab-theme-skin--> </div><!--tab-container-->
<?php if (have_posts()) { while (have_posts()) { the_post(); get_template_part('library/templates/content-single', get_post_format()); ?> <?php if ('show' == kopa_get_option('kopa_theme_options_post_about_author')) { ?> <div class="about-author clearfix"> <header class="clearfix"> <h4><?php _e('About the author', kopa_get_domain()); ?> / </h4> <a class="author-name" href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?> "><?php the_author(); ?> </a> </header> <a class="avatar-thumb" href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?> "><?php echo get_avatar(get_the_author_meta('ID'), 82);