function qode_visual_composer_custom_shortcodce_css() { if (qode_visual_composer_installed()) { if (is_page() || is_single() || is_singular('portfolio_page')) { $shortcodes_custom_css = get_post_meta(qode_get_page_id(), '_wpb_shortcodes_custom_css', true); if (!empty($shortcodes_custom_css)) { echo '<style type="text/css" data-type="vc_shortcodes-custom-css-' . qode_get_page_id() . '">'; echo $shortcodes_custom_css; echo '</style>'; } $post_custom_css = get_post_meta(qode_get_page_id(), '_wpb_post_custom_css', true); if (!empty($post_custom_css)) { echo '<style type="text/css" data-type="vc_custom-css-' . qode_get_page_id() . '">'; echo $post_custom_css; echo '</style>'; } } } }
$content_class = "content_top_margin"; } elseif (qode_is_content_below_header() && $qode_options_proya['header_bottom_appearance'] == "fixed_hiding") { $content_class = "content_top_margin"; } else { $content_class = "content_top_margin_none"; } } if (get_post_meta($id, "qode_revolution-slider", true) != "") { $content_class .= " has_slider"; } ?> <?php if (isset($qode_options_proya['header_bottom_appearance']) && ($qode_options_proya['header_bottom_appearance'] == "stick" || $qode_options_proya['header_bottom_appearance'] == "stick menu_bottom" || $qode_options_proya['header_bottom_appearance'] == "stick_with_left_right_menu")) { if (get_post_meta(qode_get_page_id(), "qode_page_hide_initial_sticky", true) !== '') { if (get_post_meta(qode_get_page_id(), "qode_page_hide_initial_sticky", true) == 'yes') { $content_class = " "; } } else { if (isset($qode_options_proya['hide_initial_sticky']) && $qode_options_proya['hide_initial_sticky'] == 'yes') { $content_class = " "; } } } ?> <?php if (isset($qode_options_proya['paspartu']) && $qode_options_proya['paspartu'] == 'yes') { $paspartu_additional_classes = ""; if (isset($qode_options_proya['paspartu_on_top']) && $qode_options_proya['paspartu_on_top'] == 'no') {
<?php /* Template Name: Blog Vertical Loop */ get_header(); global $wp_query; global $qode_template_name; $id = qode_get_page_id(); $qode_template_name = get_page_template_slug($id); $category = get_post_meta($id, "qode_choose-blog-category", true); $post_number = esc_attr(get_post_meta($id, "qode_show-posts-per-page", true)); if (get_query_var('paged')) { $paged = get_query_var('paged'); } elseif (get_query_var('page')) { $paged = get_query_var('page'); } else { $paged = 1; } $sidebar = get_post_meta($id, "qode_show-sidebar", true); if (get_post_meta($id, "qode_page_background_color", true) != "") { $background_color = 'background-color: ' . esc_attr(get_post_meta($id, "qode_page_background_color", true)); } else { $background_color = ""; } if (isset($qode_options_proya['blog_vertical_loop_type_number_of_chars']) && $qode_options_proya['blog_vertical_loop_type_number_of_chars'] != "") { qode_set_blog_word_count(esc_attr($qode_options_proya['blog_vertical_loop_type_number_of_chars'])); } $content_style_spacing = ""; if (get_post_meta($id, "qode_margin_after_title", true) != "") { if (get_post_meta($id, "qode_margin_after_title_mobile", true) == 'yes') {
/** * Function that echoes meta data if our seo is enabled */ function qode_header_meta() { global $qode_options_proya; if (isset($qode_options_proya['disable_qode_seo']) && $qode_options_proya['disable_qode_seo'] == 'no') { $seo_description = get_post_meta(qode_get_page_id(), "qode_seo_description", true); $seo_keywords = get_post_meta(qode_get_page_id(), "qode_seo_keywords", true); ?> <?php if ($seo_description) { ?> <meta name="description" content="<?php echo $seo_description; ?> "> <?php } else { if ($qode_options_proya['meta_description']) { ?> <meta name="description" content="<?php echo $qode_options_proya['meta_description']; ?> "> <?php } } ?> <?php if ($seo_keywords) { ?> <meta name="keywords" content="<?php echo $seo_keywords; ?> "> <?php } else { if ($qode_options_proya['meta_keywords']) { ?> <meta name="keywords" content="<?php echo $qode_options_proya['meta_keywords']; ?> "> <?php } } } }
function qode_custom_breadcrumbs() { global $post; $homeLink = home_url(); $blogTitle = get_option('blogname'); global $wp_query; $pageid = qode_get_page_id(); $bread_style = ""; if (get_post_meta($pageid, "qode_page_breadcrumbs_color", true) != "") { $bread_style = " style='color:" . get_post_meta($pageid, "qode_page_breadcrumbs_color", true) . "';"; } $showOnHome = 1; // 1 - show breadcrumbs on the homepage, 0 - don't show $delimiter = '<span class="delimiter"' . $bread_style . '> / </span>'; // delimiter between crumbs $home = get_bloginfo('name'); // text for the 'Home' link $showCurrent = 1; // 1 - show current post/page title in breadcrumbs, 0 - don't show $before = '<span class="current"' . $bread_style . '>'; // tag before the current crumb $after = '</span>'; // tag after the current crumb if (is_home() && !is_front_page()) { echo '<div class="breadcrumbs"><div class="breadcrumbs_inner"><a' . $bread_style . ' href="' . $homeLink . '">' . $home . '</a>' . $delimiter . ' <a' . $bread_style . ' href="' . $homeLink . '">' . get_the_title($pageid) . '</a></div></div>'; } elseif (is_home()) { echo '<div class="breadcrumbs"><div class="breadcrumbs_inner">' . $before . $home . $after . '</div></div>'; } elseif (is_front_page()) { if ($showOnHome == 1) { echo '<div class="breadcrumbs"><div class="breadcrumbs_inner"><a' . $bread_style . ' href="' . $homeLink . '">' . $home . '</a></div></div>'; } } else { echo '<div class="breadcrumbs"><div class="breadcrumbs_inner"><a' . $bread_style . ' href="' . $homeLink . '">' . $home . '</a>' . $delimiter; if (is_category() || qode_is_product_category()) { $thisCat = get_category(get_query_var('cat'), false); if (isset($thisCat->parent) && $thisCat->parent != 0) { echo get_category_parents($thisCat->parent, TRUE, ' ' . $delimiter); } echo $before . single_cat_title('', false) . $after; } elseif (is_search()) { echo $before . __('Search results for', 'qode') . ' "' . get_search_query() . '"' . $after; } elseif (is_day()) { echo '<a' . $bread_style . ' href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a>' . $delimiter; echo '<a' . $bread_style . ' href="' . get_month_link(get_the_time('Y'), get_the_time('m')) . '">' . get_the_time('F') . '</a>' . $delimiter; echo $before . get_the_time('d') . $after; } elseif (is_month()) { echo '<a' . $bread_style . ' href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a>' . $delimiter; echo $before . get_the_time('F') . $after; } elseif (is_year()) { echo $before . get_the_time('Y') . $after; } elseif (qode_is_woocommerce_page() && is_singular('product')) { if (get_option('woocommerce_shop_page_id')) { echo '<a' . $bread_style . ' href="' . get_permalink(get_option('woocommerce_shop_page_id')) . '">' . get_the_title(get_option('woocommerce_shop_page_id')) . '</a>' . $delimiter; } if ($showCurrent == 1) { echo $before . get_the_title() . $after; } } elseif (is_single() && !is_attachment()) { if (get_post_type() != 'post') { $post_type = get_post_type_object(get_post_type()); $slug = $post_type->rewrite; if ($showCurrent == 1) { echo $before . get_the_title() . $after; } } else { $cat = get_the_category(); $cat = $cat[0]; $cats = get_category_parents($cat, TRUE, ' ' . $delimiter); if ($showCurrent == 0) { $cats = preg_replace("#^(.+)\\s{$delimiter}\\s\$#", "\$1", $cats); } echo $cats; if ($showCurrent == 1) { echo $before . get_the_title() . $after; } } } elseif (is_attachment() && !$post->post_parent) { if ($showCurrent == 1) { echo $before . get_the_title() . $after; } } elseif (is_attachment()) { $parent = get_post($post->post_parent); $cat = get_the_category($parent->ID); if ($cat) { $cat = $cat[0]; echo get_category_parents($cat, TRUE, ' ' . $delimiter); } echo '<a' . $bread_style . ' href="' . get_permalink($parent) . '">' . $parent->post_title . '</a>'; if ($showCurrent == 1) { echo $delimiter . $before . get_the_title() . $after; } } elseif (is_page() && !$post->post_parent) { if ($showCurrent == 1) { echo $before . get_the_title($pageid) . $after; } } elseif (is_page() && $post->post_parent) { $parent_id = $post->post_parent; $breadcrumbs = array(); while ($parent_id) { $page = get_page($parent_id); $breadcrumbs[] = '<a' . $bread_style . ' href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>'; $parent_id = $page->post_parent; } $breadcrumbs = array_reverse($breadcrumbs); for ($i = 0; $i < count($breadcrumbs); $i++) { echo $breadcrumbs[$i]; if ($i != count($breadcrumbs) - 1) { echo ' ' . $delimiter; } } if ($showCurrent == 1) { echo $delimiter . $before . get_the_title() . $after; } } elseif (is_tag()) { echo $before . __('Posts tagged', 'qode') . ' "' . single_tag_title('', false) . '"' . $after; } elseif (is_author()) { global $author; $userdata = get_userdata($author); echo $before . __('Articles posted by ', 'qode') . $userdata->display_name . $after; } elseif (is_404()) { echo $before . __('Error 404', 'qode') . $after; } elseif (function_exists("is_woocommerce") && is_shop()) { global $woocommerce; $shop_id = get_option('woocommerce_shop_page_id'); $shop = get_page($shop_id); echo $before . $shop->post_title . $after; } if (get_query_var('paged')) { echo $before . " (" . __('Page', 'qode') . ' ' . get_query_var('paged') . ")" . $after; } echo '</div></div>'; } }
/** * Function that echoes meta data for ajax * * @since 5.0 * @version 0.2 */ function qode_ajax_meta() { global $qode_options_theme13; $seo_description = get_post_meta(qode_get_page_id(), "qode_seo_description", true); $seo_keywords = get_post_meta(qode_get_page_id(), "qode_seo_keywords", true); ?> <div class="seo_title"><?php wp_title(''); ?> </div> <?php if ($seo_description !== '') { ?> <div class="seo_description"><?php echo $seo_description; ?> </div> <?php } else { if ($qode_options_theme13['meta_description']) { ?> <div class="seo_description"><?php echo $qode_options_theme13['meta_description']; ?> </div> <?php } } ?> <?php if ($seo_keywords !== '') { ?> <div class="seo_keywords"><?php echo $seo_keywords; ?> </div> <?php } else { if ($qode_options_theme13['meta_keywords']) { ?> <div class="seo_keywords"><?php echo $qode_options_theme13['meta_keywords']; ?> </div> <?php } } }