'; if (is_home() || is_front_page()) : echo '
  • '.esc_html__('Home','business-health').'
  • '; echo '
  • '; echo single_post_title(); echo '
  • '; else: echo '
  • '.esc_html__('Home','business-health').'
  • '; if ( is_category() ) { echo '
  • ' . esc_html__('Archive by category','business-health').' "' . single_cat_title('', false) . '"
  • '; } elseif ( is_day() ) { echo '
  • '. esc_html(get_the_time('Y')) .''; echo '
  • '. esc_html(get_the_time('F')) .''; echo '
  • '. esc_html(get_the_time('d')) .'
  • '; } elseif ( is_month() ) { echo '
  • ' . esc_html(get_the_time('Y')) . ''; echo '
  • '. esc_html(get_the_time('F')) .'
  • '; } elseif ( is_year() ) { echo '
  • '. esc_html(get_the_time('Y')) .'
  • '; } elseif ( is_single() && !is_attachment() && is_page('single-product') ) { if ( get_post_type() != 'post' ) { $cat = get_the_category(); $cat = $cat[0]; echo '
  • '; echo esc_html( get_category_parents($cat, TRUE, '') ); echo '
  • '; echo '
  • '. wp_title( '',false ) .'
  • '; } } elseif ( is_page() && $post->post_parent ) { $parent_id = $post->post_parent; $breadcrumbs = array(); while ($parent_id) { $page = get_page($parent_id); $breadcrumbs[] = '
  • ' . esc_html( get_the_title($page->ID)) . ''; $parent_id = $page->post_parent; } $breadcrumbs = array_reverse($breadcrumbs); foreach ($breadcrumbs as $crumb) echo $crumb; echo '
  • '. esc_html( get_the_title() ).'
  • '; } elseif( is_search() ) { echo '
  • '. get_search_query() .'
  • '; } elseif( is_404() ) { echo '
  • '.esc_html__('Error 404','business-health').'
  • '; } else { echo '
  • '. esc_html( get_the_title() ) .'
  • '; } endif; echo ''; } endif; /** * Theme Breadcrumbs Url */ function business_health_page_url() { global $wp; $current_url = esc_url(home_url(add_query_arg(array(), $wp->request))); return $current_url; } /************* * Widgets * ************/ /** * Registers the new widget to add it to the available widgets * @since 1.0.0 */ function business_health_Search_register_widget() { register_widget( 'business_health_Search_Widget' ); } add_action( 'widgets_init', 'business_health_Search_register_widget' ); /* * Post Widget */ class business_health_Post_Widget extends WP_Widget { /** * Setup the widget options * @since 1.0 */ public function __construct() { // set widget options $options = array( 'classname' => 'business_health_Post_Widget', // CSS class name 'description' => esc_html__( 'Pro- Post Widget.', 'business-health' ), ); // instantiate the widget parent::__construct( 'business_health_Post_Widget', esc_html__( 'Pro- Post Widget', 'business-health' ), $options ); } public function widget( $args, $instance ) { $category = ( ! empty( $instance['category'] ) ) ? strip_tags( $instance['category'] ) : 0; $colums = (!empty($instance['colums'])) ? strip_tags($instance['colums']) : "col-md-3 col-sm-3 col-lg-3 col-xs-12"; // get the widget configuration $title = ""; if(isset($instance['title'])) $title = $instance['title']; if ( $title ) { echo "

    ".wp_kses_post($title)."

    "; } ?>
    'post', 'ignore_sticky_posts' => 1 , 'cat' => $category , 'posts_per_page' => absint($max_items), 'numberposts' => absint($max_items) , 'orderby' => 'date', 'order' => 'DESC' ); $page_query = new WP_Query($args);?> have_posts() ) : $page_query->the_post(); ?>

    'name', 'exclude' => '', 'include' => '', 'parent' => 0 ); $categories = get_categories( $args ); $category_code = ''; if(0==$category){ $category_code = $category_code.''; } else{ $category_code = $category_code.''; } foreach ( $categories as $cat ) { $selected =''; if(($cat->term_id)==$category){ $selected ='Selected=selected'; } $category_code = $category_code.''; } // $bootstrap_colums = array( "col-md-12 col-sm-12 col-lg-12 col-xs-12" => 1, "col-md-6 col-sm-6 col-lg-6 col-xs-12" => 2, "col-md-4 col-sm-4 col-lg-4 col-xs-12" => 3, "col-md-3 col-sm-3 col-lg-3 col-xs-12" => 4, "col-md-2 col-sm-2 col-lg-2 col-xs-12" => 6, ); ?>

    'business_health_Search_Widget', // CSS class name 'description' => esc_html__( 'WooCommerce Search [With Categories]', 'business-health' ), ); // instantiate the widget parent::__construct( 'business_health_Search_Widget', esc_html__( 'Pro- WooCommerce Search Widget', 'business-health' ), $options ); } public function widget( $args, $instance ) { // get the widget configuration $title = ""; if(isset($instance['title'])) $title = $instance['title']; if ( $title ) { echo wp_kses_post($args['before_title']) . wp_kses_post($title) . wp_kses_post($args['after_title']); } ?>