</div> <?php // SIDEBAR get_sidebar('404'); ?> </div> </section> <!-- Content part section END --> <?php } else { // USE DEFAULT 404 TEMPLATE ishyoboy_custom_lead('<h1 class="color1">Oh dear!</h1><h2>No matter how hard we try, we\'re unable to find the page you\'re looking for.</h2>'); ?> <!-- Content part section --> <section class="part-content"> <div class="row"> <div class="grid12 no-sidebar"> <?php // Breadcrumbs display ishyoboy_show_breadcrumbs(); ?> <div class="space"></div> <p>We've searched more than <strong>404</strong> pages and none of them seems to be the one you we're looking for.</p> <p>Why don't you have a look around and try to find it?</p> <div class="space"></div>
$lead .= '' != do_shortcode($current_term->description) ? do_shortcode($current_term->description) : ''; $lead .= '</div>'; ishyoboy_custom_lead($lead); } elseif (is_archive()) { $lead = '<div class="archive-lead post-archive-lead"><h1 class="color1">'; if (is_day()) { $lead .= sprintf(__('Daily Archives: %s', 'ishyoboy'), '<span>' . get_the_date() . '</span>'); } elseif (is_month()) { $lead .= sprintf(__('Monthly Archives: %s', 'ishyoboy'), '<span>' . get_the_date(_x('F Y', 'monthly archives date format', 'ishyoboy')) . '</span>'); } elseif (is_year()) { $lead .= sprintf(__('Yearly Archives: %s', 'ishyoboy'), '<span>' . get_the_date(_x('Y', 'yearly archives date format', 'ishyoboy')) . '</span>'); } else { $lead .= __('Archives', 'ishyoboy'); } $lead .= '</h1>'; ishyoboy_custom_lead($lead); } else { ishyoboy_get_lead(get_the_ID()); } ?> <!-- Content part section --> <section class="part-content"> <div class="row"> <div class="<?php echo ishyoboy_get_content_class(); ?> "> <?php // Breadcrumbs display
function ishyoboy_get_lead($id) { global $post, $page, $ish_woo_id, $wp_query; if (null == $id) { if (!is_tax() && !is_404() && !is_search()) { $id = get_the_ID(); } } if (null != $id) { $return = ''; $return .= '<!-- Lead part section -->' . "\n"; $display_lead = IshYoMetaBox::get('ishyoboy_display_lead', true, $id); if ('true' == $display_lead || '' == $display_lead) { $lead = IshYoMetaBox::get('ishyoboy_lead', true, $id); if (empty($lead)) { $lead = '[headline tag="h1" color="color1"][the_title][/headline]'; } $box_type = IshYoMetaBox::get('ishyoboy_lead_type', true, $id); if ('' != $lead) { global $wp_embed; $has_rev_slider = has_shortcode($lead, 'rev_slider'); $has_rev_class = $has_rev_slider ? ' ish-has-rev' : ''; $return .= '<section class="part-lead' . $has_rev_class . ('unboxed' == $box_type ? ' lead-unboxed' : ' lead-boxed') . '" id="part-lead">' . "\n"; if ('unboxed' != $box_type) { $return .= ' <div class="row">' . "\n"; $return .= ' <section class="grid12">' . "\n"; } if ($has_rev_slider) { $return .= do_shortcode($lead); } else { $return .= wpautop(do_shortcode($wp_embed->run_shortcode($lead))) . "\n"; } if ('unboxed' != $box_type) { $return .= ' </section>' . "\n"; $return .= ' </div>' . "\n"; } $return .= '</section>' . "\n"; } } $return .= '<!-- Lead part section END -->' . "\n"; echo apply_filters('ishyoboy_lead', $return); } else { $current_term = get_queried_object(); //<!-- Lead part section --> $lead = '<div class="category-lead">'; $lead .= '<h1 class="color1">'; if (is_tax('product_tag')) { $lead .= __('Tag: ', 'ishyoboy'); } else { if (is_tax('product_cat')) { $lead .= __('Category: ', 'ishyoboy'); } } $lead .= $current_term->name; $lead .= '</h1>'; $lead .= '' != do_shortcode($current_term->description) ? do_shortcode($current_term->description) : ''; $lead .= '</div>'; ishyoboy_custom_lead($lead); //<!-- Lead part section --> } }