'product_cat', 'fields' => 'id=>name', 'parent' => 0, 'hide_empty' => true, ); /** * Hook 'botiga_shop_page_header_cats_query_args' * * @since 1.0.0 */ $categories = get_terms( apply_filters( 'botiga_shop_page_header_cats_query_args', $args ) ); } // Sub Categories $sub_categories = 0; if( is_product_category() || is_product_tag() || is_product_taxonomy() ) { $category = get_category( $GLOBALS['wp_query']->get_queried_object() ); $args = array( 'taxonomy' => 'product_cat', 'parent' => isset( $category->term_id ) ? $category->term_id : 0, 'fields' => 'id=>name', 'hide_empty' => true, ); /** * Hook 'botiga_shop_page_header_sub_cats_query_args' * * @since 1.0.0 */ $sub_categories = get_terms( apply_filters( 'botiga_shop_page_header_sub_cats_query_args', $args ) ); } // Return early to don't display the wc page header if all the options are disabled if( ! $shop_page_title && ! $shop_page_description && ! $shop_breadcrumbs && ( ! $shop_archive_header_style_show_categories || $shop_archive_header_style_show_categories && empty( $categories ) ) && ( ! $shop_archive_header_style_show_sub_categories || $shop_archive_header_style_show_sub_categories && empty( $sub_categories ) ) ) { return; } ?>
%3$s', tag_escape( $title_html_tag ), botiga_schema( 'headline', false ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped esc_html( woocommerce_page_title( false ) ) ); } if( ( $shop_page_description && ( is_shop() || is_product_category() || is_product_tag() || is_product_taxonomy() ) ) || !is_shop() && !is_product_category() && !is_product_tag() && !is_product_taxonomy() ) { botiga_woocommerce_taxonomy_archive_description(); botiga_woocommerce_product_archive_description(); } if( $shop_archive_header_style_show_categories ) { botiga_shop_page_header_category_links( $categories ); } if( $shop_archive_header_style_show_sub_categories && ( is_product_category() || is_product_tag() || is_product_taxonomy() ) ) { botiga_shop_page_header_sub_category_links( $sub_categories ); } ?>
0 ) : ?>
$cat_name ) { $cat_link = get_term_link( $cat_id ); /** * Hook 'botiga_shop_page_header_category_inner_item_after_name' * * @since 1.0.0 */ echo ''. esc_html( $cat_name ) . esc_html( apply_filters( 'botiga_shop_page_header_category_inner_item_after_name', '', $cat_id ) ) .''; } ?>
0 ) : ?>
$cat_name ) { $cat_link = get_term_link( $cat_id ); /** * Hook 'botiga_shop_page_header_category_inner_item_after_name' * * @since 1.0.0 */ echo ''. esc_html( $cat_name ) . esc_html( apply_filters( 'botiga_shop_page_header_category_inner_item_after_name', '', $cat_id ) ) .''; } ?>