Changing the Woocommerce breadcrumb menu [closed]

A cleaner way to display a delimiter would be a CSS-border (like Aibrean suggested). But you can set up the filter to fit your needs: add_filter( ‘woocommerce_breadcrumb_defaults’, ‘custom_woocommerce_breadcrumbs’ ); function custom_woocommerce_breadcrumbs() { return array( ‘delimiter’ => ‘<li class=”separator”> | </li>’, ‘wrap_before’ => ‘<div><ul class=”crumbs”>’, ‘wrap_after’ => ‘</ul></div>’, ‘before’ => ‘<li>’, ‘after’ => ‘</li>’, ‘home’ => … Read more

Woocommerce query all products and categories

You can use wp_get_post_terms() $categories = wp_get_post_terms(get_the_ID(), ‘product_cat’, array(“fields” => “names”)); print_r($categories); The names of the product categories are returned as an array so you can either loop through them with a foreach or you can turn it into a string for example: $categories_list = implode(“,”, $categories); If you need more than just the names, … Read more

Modify SKU for display on product page

Try using the core WooCommerce filter woocommerce_get_sku: function wpse_188691_woocommerce_get_sku( $sku, $product ) { if ( ! is_admin() ) { $parts = explode( ‘.’, $sku ); // Only first two parts $parts = array_slice( $parts, 0, 2 ); // OR all parts except last (remove above) // array_pop( $parts ); $sku = implode( ‘.’, $parts ); … Read more

Arranging Product Details on Shop Page

So… I was working on another section of the site and was browsing the Foundation Docs. I saw the ability to push/pull columns and decided to give it a try. It worked. Here’s the code I used: <li <?php post_class( $classes ); ?>> <?php do_action( ‘woocommerce_before_shop_loop_item’ ); ?> <div class=”row”> <a href=”https://wordpress.stackexchange.com/questions/190647/<?php the_permalink(); ?>”> <div … Read more