/* Remove "in stock" text form single products */
 function remove_in_stock_text_form_single_products( $html, $text, $product ) {
    $availability = $product->get_availability();
    if ( isset( $availability['class'] ) && 'in-stock' === $availability['class'] ) {
        return '';
    }
    return $html;
}
add_filter( 'woocommerce_stock_html', 'remove_in_stock_text_form_single_products', 10, 3 );
// Replace number rating with icon stars
add_filter( 'facetwp_ratings_icon', function( $icon, $is_disabled, $facet ) {
  if ( $facet['name'] === 'star-rating' ) { // Replace "my_star_rating_facet" with the name of your Star Rating facet
    $icon = '🟊'; 	  
  return $icon;
}
}, 10, 3 ); 

// Adds the add to cart button. Add a Button item in your Listing Builder template, and give it the Unique name 'add-to-cart'.
 
add_filter( 'facetwp_builder_item_value', function( $value, $item ) {
  if ( 'add-to-cart' == $item['settings']['name'] ) {
    global $post;
    $value = do_shortcode( '[add_to_cart id="' . $post->ID . '"]' );
  }
  return $value;
}, 10, 2 );function cg_remove_shortcode_from_excerpt($content) {
    if (!is_search()) return;

    $pattern = get_shortcode_regex();
    $shortcode_matches = array();

    if (preg_match_all('/' . $pattern . '/s', $content, $matches)) {
        foreach ($matches[0] as $shortcode) {
            $content = str_replace($shortcode, '', $content);
        }
    }

    $content = strip_shortcodes($content);
    return $content;
}

add_filter('the_excerpt', 'cg_remove_shortcode_from_excerpt');
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//bydezignfurniture.co.nz/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://bydezignfurniture.co.nz/post-sitemap.xml</loc>
		<lastmod>2025-01-13T23:51:42+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://bydezignfurniture.co.nz/page-sitemap.xml</loc>
		<lastmod>2025-03-19T01:06:13+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://bydezignfurniture.co.nz/product-sitemap.xml</loc>
		<lastmod>2026-02-08T20:59:03+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://bydezignfurniture.co.nz/category-sitemap.xml</loc>
		<lastmod>2025-01-13T23:51:42+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://bydezignfurniture.co.nz/product_cat-sitemap.xml</loc>
		<lastmod>2026-02-08T20:59:03+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://bydezignfurniture.co.nz/pa_colour-sitemap.xml</loc>
		<lastmod>2026-02-08T20:59:03+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://bydezignfurniture.co.nz/pa_materials-sitemap.xml</loc>
		<lastmod>2026-02-08T20:31:27+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://bydezignfurniture.co.nz/local-sitemap.xml</loc>
		<lastmod>2025-03-19T01:29:38+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Rank Math SEO Plugin (c) Rank Math - rankmath.com -->