<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>

		<title>How to feature product category in breadcrumbs &#8211; Themeco Community</title>
		<atom:link href="https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/feed/" rel="self" type="application/rss+xml" />
		<link>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/feed/</link>
		<description></description>
		<lastBuildDate>Wed, 05 Nov 2025 09:16:30 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.14</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-149943</guid>
					<title><![CDATA[How to feature product category in breadcrumbs]]></title>
					<link>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-149943</link>
					<pubDate>Fri, 21 Nov 2014 15:35:47 +0000</pubDate>
					<dc:creator>Mark M</dc:creator>

					<description>
						<![CDATA[
						<p>HI,</p>
<p>I am putting together a furniture website using various categories and tags via the woocommerce shop plugin. I have named my shop as &#8220;collection&#8221;. When I click on it collection shows in the breadcrumbs and if I make a category selection that is included to. Like this;</p>
<p>Home &gt; Collection &gt; Mirrors</p>
<p>If one of the mirrors is selected the breadcrumb loses the category, like this;</p>
<p>Home &gt; Collection &gt; George III Adam Oval Mirror</p>
<p>How can I make it show this?</p>
<p>Home &gt; Collection &gt; Mirrors &gt; George III Adam Oval Mirror</p>
<p>Thanks in advance for your great support.</p>
<p>Regards,</p>
<p>Mark</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-150376</guid>
					<title><![CDATA[Reply To: How to feature product category in breadcrumbs]]></title>
					<link>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-150376</link>
					<pubDate>Sat, 22 Nov 2014 10:08:54 +0000</pubDate>
					<dc:creator>Christopher</dc:creator>

					<description>
						<![CDATA[
						<p>Hi there,</p>
<p>Please switch to default wordpress theme and check if woocommerce breadcrumbs act differently or not?</p>
<p>Let us know about it.</p>
<p>Thank you.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-150381</guid>
					<title><![CDATA[Reply To: How to feature product category in breadcrumbs]]></title>
					<link>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-150381</link>
					<pubDate>Sat, 22 Nov 2014 10:31:42 +0000</pubDate>
					<dc:creator>Mark M</dc:creator>

					<description>
						<![CDATA[
						<p>Hi,</p>
<p>I have switched to the theme &#8220;twenty fourteen&#8221; and this page;</p>
<p><a href="http://jonathan-sainsbury.com.visionphoto.co.uk/collection/tables/adam-anthemion-pier-table/" rel="nofollow">http://jonathan-sainsbury.com.visionphoto.co.uk/collection/tables/adam-anthemion-pier-table/</a></p>
<p>gives me the breadcrumb;</p>
<p>Home / Collection / Tables / Adam Anthemion Pier Table </p>
<p>Which is how I would like X breadcrumbs to work, in X it is like this;</p>
<p>Home / Collection / Adam Anthemion Pier Table </p>
<p>Mark</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-150383</guid>
					<title><![CDATA[Reply To: How to feature product category in breadcrumbs]]></title>
					<link>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-150383</link>
					<pubDate>Sat, 22 Nov 2014 10:33:48 +0000</pubDate>
					<dc:creator>Mark M</dc:creator>

					<description>
						<![CDATA[
						This reply has been marked as private.						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-150815</guid>
					<title><![CDATA[Reply To: How to feature product category in breadcrumbs]]></title>
					<link>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-150815</link>
					<pubDate>Sun, 23 Nov 2014 08:31:02 +0000</pubDate>
					<dc:creator>Zeshan</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Mark,</p>
<p>Thank you for writing in!</p>
<p>Please add following code in your child theme&#8217;s <strong>functions.php</strong> file:</p>
<pre><code>// Breadcrumbs Display Category Name
// =============================================================================

function get_breadcrumb_category( $cat ) {
   $post = get_post( $post-&gt;ID );
   $post_type = $post-&gt;post_type;
   $taxonomy = $cat;

   $f_categories = wp_get_post_terms( $post-&gt;ID, $taxonomy );
   $f_category = $f_categories[0];

   if ( $f_category-&gt;parent != 0 ) {
      $f_category_id    = $f_category-&gt;parent;
      $parent_array     = get_term_by(&#039;id&#039;, $f_category_id, $taxonomy, &#039;ARRAY_A&#039;);
      $f_category_name  = $parent_array[&quot;name&quot;];
      $term_link        = get_term_link( $f_category_id, $taxonomy );
   } else {
      $f_category_id    = $f_category-&gt;term_id;
      $f_category_name  = $f_category-&gt;name;
      $term_link        = get_term_link( $f_category_id, $taxonomy );
   }

   if ( $f_categories &amp;&amp; ! is_wp_error($f_categories) ) {
      return &#039;&lt;a href=&quot;&#039; . $term_link . &#039;&quot;&gt;&#039; . $f_category_name . &#039;&lt;/a&gt;&#039;;
   } else {
      return &#039;&#039;;
   }
}

function x_breadcrumbs() {

  if ( x_get_option( &#039;x_breadcrumb_display&#039;, &#039;1&#039; ) ) {

    GLOBAL $post;

    $is_ltr         = ! is_rtl();
    $stack          = x_get_stack();
    $delimiter      = x_get_breadcrumb_delimiter();
    $home_text      = x_get_breadcrumb_home_text();
    $home_link      = home_url();
    $current_before = x_get_breadcrumb_current_before();
    $current_after  = x_get_breadcrumb_current_after();
    $page_title     = get_the_title();
    $blog_title     = get_the_title( get_option( &#039;page_for_posts&#039;, true ) );

    if ( ! is_404() ) {
      $post_parent = $post-&gt;post_parent;
    } else {
      $post_parent = &#039;&#039;;
    }

    if ( X_WOOCOMMERCE_IS_ACTIVE ) {
      $shop_url   = x_get_shop_link();
      $shop_title = x_get_option( &#039;x_&#039; . $stack . &#039;_shop_title&#039;, __( &#039;The Shop&#039;, &#039;__x__&#039; ) );
      $shop_link  = &#039;&lt;a href=&quot;&#039;. $shop_url .&#039;&quot;&gt;&#039; . $shop_title . &#039;&lt;/a&gt;&#039;;
    }

    echo &#039;&lt;div class=&quot;x-breadcrumbs&quot;&gt;&lt;a href=&quot;&#039; . $home_link . &#039;&quot;&gt;&#039; . $home_text . &#039;&lt;/a&gt;&#039; . $delimiter;

      if ( is_home() ) {

        echo $current_before . $blog_title . $current_after;

      } elseif ( is_category() ) {

        $the_cat = get_category( get_query_var( &#039;cat&#039; ), false );
        if ( $the_cat-&gt;parent != 0 ) echo get_category_parents( $the_cat-&gt;parent, TRUE, $delimiter );
        echo $current_before . single_cat_title( &#039;&#039;, false ) . $current_after;

      } elseif ( x_is_product_category() ) {

        if ( $is_ltr ) {
          echo $shop_link . $delimiter . $current_before . single_cat_title( &#039;&#039;, false ) . $current_after;
        } else {
          echo $current_before . single_cat_title( &#039;&#039;, false ) . $current_after . $delimiter . $shop_link;
        }

      } elseif ( x_is_product_tag() ) {

        if ( $is_ltr ) {
          echo $shop_link . $delimiter . $current_before . single_tag_title( &#039;&#039;, false ) . $current_after;
        } else {
          echo $current_before . single_tag_title( &#039;&#039;, false ) . $current_after . $delimiter . $shop_link;
        }

      } elseif ( is_search() ) {

        echo $current_before . __( &#039;Search Results for &#039;, &#039;__x__&#039; ) . &#039;&#8220;&#039; . get_search_query() . &#039;&#8221;&#039; . $current_after;

      } elseif ( is_singular( &#039;post&#039; ) ) {

        if ( get_option( &#039;page_for_posts&#039; ) == is_front_page() ) {
          echo $current_before . $page_title . $current_after;
        } else {
          if ( $is_ltr ) {

            $f_category = get_the_category();

            if ( $f_category[0]-&gt;parent != 0 ) {
               $f_category_id = $f_category[0]-&gt;parent;
               $f_category_name = get_cat_name( $f_category_id );
            } else {
               $f_category_id = $f_category[0]-&gt;term_id;
               $f_category_name = $f_category[0]-&gt;name;
            }

            echo &#039;&lt;a href=&quot;&#039; . get_category_link( $f_category_id ) . &#039;&quot;&gt;&#039; . $f_category_name . &#039;&lt;/a&gt;&#039; . $delimiter . $current_before . $page_title . $current_after;
          } else {
            echo $current_before . $page_title . $current_after . $delimiter . &#039;&lt;a href=&quot;&#039; . get_permalink( get_option( &#039;page_for_posts&#039; ) ) . &#039;&quot;&gt;&#039; . $blog_title . &#039;&lt;/a&gt;&#039;;
          }
        }

      } elseif ( x_is_portfolio() ) {

        echo $current_before . get_the_title() . $current_after;

      } elseif ( x_is_portfolio_item() ) {

        $link  = x_get_parent_portfolio_link();
        $title = x_get_parent_portfolio_title();

        if ( $v = get_breadcrumb_category(&#039;portfolio-category&#039;) ) {
          $portfolio_category = $delimiter . $v;
        } else {
          $portfolio_category = &#039;&#039;;
        }

        if ( $is_ltr ) {
          echo &#039;&lt;a href=&quot;&#039; . $link . &#039;&quot;&gt;&#039; . $title . &#039;&lt;/a&gt;&#039; . $portfolio_category . $delimiter . $current_before . $page_title . $current_after;
        } else {
          echo $current_before . $page_title . $current_after . $portfolio_category . $delimiter . &#039;&lt;a href=&quot;&#039; . $link . &#039;&quot;&gt;&#039; . $title . &#039;&lt;/a&gt;&#039;;
        }

      } elseif ( x_is_product() ) {

       if ( $v = get_breadcrumb_category(&#039;product_cat&#039;) ) {
         $product_category = $delimiter . $v;
       } else {
         $product_category = &#039;&#039;;
       }

        if ( $is_ltr ) {
          echo $shop_link . $product_category . $delimiter . $current_before . $page_title . $current_after;
        } else {
          echo $current_before . $page_title . $current_after . $product_category . $delimiter . $shop_link;
        }

      } elseif ( x_is_buddypress() ) {

        if ( bp_is_group() ) {
          echo &#039;&lt;a href=&quot;&#039; . bp_get_groups_directory_permalink() . &#039;&quot;&gt;&#039; . x_get_option( &#039;x_buddypress_groups_title&#039;, __( &#039;Groups&#039;, &#039;__x__&#039; ) ) . &#039;&lt;/a&gt;&#039; . $delimiter . $current_before . x_buddypress_get_the_title() . $current_after;
        } elseif ( bp_is_user() ) {
          echo &#039;&lt;a href=&quot;&#039; . bp_get_members_directory_permalink() . &#039;&quot;&gt;&#039; . x_get_option( &#039;x_buddypress_members_title&#039;, __( &#039;Members&#039;, &#039;__x__&#039; ) ) . &#039;&lt;/a&gt;&#039; . $delimiter . $current_before . x_buddypress_get_the_title() . $current_after;
        } else {
          echo $current_before . x_buddypress_get_the_title() . $current_after;
        }

      } elseif ( x_is_bbpress() ) {

        remove_filter( &#039;bbp_no_breadcrumb&#039;, &#039;__return_true&#039; );

        if ( bbp_is_forum_archive() ) {
          echo $current_before . bbp_get_forum_archive_title() . $current_after;
        } else {
          echo bbp_get_breadcrumb();
        }

        add_filter( &#039;bbp_no_breadcrumb&#039;, &#039;__return_true&#039; );

      } elseif ( is_page() &amp;&amp; ! $post_parent ) {

        echo $current_before . $page_title . $current_after;

      } elseif ( is_page() &amp;&amp; $post_parent ) {

        $parent_id   = $post_parent;
        $breadcrumbs = array();

        if ( is_rtl() ) {
          echo $current_before . $page_title . $current_after . $delimiter;
        }

        while ( $parent_id ) {
          $page          = get_page( $parent_id );
          $breadcrumbs[] = &#039;&lt;a href=&quot;&#039; . get_permalink( $page-&gt;ID ) . &#039;&quot;&gt;&#039; . get_the_title( $page-&gt;ID ) . &#039;&lt;/a&gt;&#039;;
          $parent_id     = $page-&gt;post_parent;
        }

        if ( $is_ltr ) {
          $breadcrumbs = array_reverse( $breadcrumbs );
        }

        for ( $i = 0; $i &lt; count( $breadcrumbs ); $i++ ) {
          echo $breadcrumbs[$i];
          if ( $i != count( $breadcrumbs ) -1 ) echo $delimiter;
        }

        if ( $is_ltr ) {
          echo $delimiter . $current_before . $page_title . $current_after;
        }

      } elseif ( is_tag() ) {

        echo $current_before . single_tag_title( &#039;&#039;, false ) . $current_after;

      } elseif ( is_author() ) {

        GLOBAL $author;
        $userdata = get_userdata( $author );
        echo $current_before . __( &#039;Posts by &#039;, &#039;__x__&#039; ) . &#039;&#8220;&#039; . $userdata-&gt;display_name . $current_after . &#039;&#8221;&#039;;

      } elseif ( is_404() ) {

        echo $current_before . __( &#039;404 (Page Not Found)&#039;, &#039;__x__&#039; ) . $current_after;

      } elseif ( is_archive() ) {

        if ( x_is_shop() ) {
          echo $current_before . $shop_title . $current_after;
        } else {
          echo $current_before . __( &#039;Archives &#039;, &#039;__x__&#039; ) . $current_after;
        }

      }

    echo &#039;&lt;/div&gt;&#039;;

  }

}
</code></pre>
<p>Hope this helps. 🙂</p>
<p>Thank you.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-150837</guid>
					<title><![CDATA[Reply To: How to feature product category in breadcrumbs]]></title>
					<link>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-150837</link>
					<pubDate>Sun, 23 Nov 2014 09:33:52 +0000</pubDate>
					<dc:creator>Mark M</dc:creator>

					<description>
						<![CDATA[
						<p>Awesome that has worked thanks 🙂</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-151217</guid>
					<title><![CDATA[Reply To: How to feature product category in breadcrumbs]]></title>
					<link>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-151217</link>
					<pubDate>Mon, 24 Nov 2014 02:35:41 +0000</pubDate>
					<dc:creator>Rad</dc:creator>

					<description>
						<![CDATA[
						<p>Cool! You&#8217;re so welcome Mark!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-160965</guid>
					<title><![CDATA[Reply To: How to feature product category in breadcrumbs]]></title>
					<link>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-160965</link>
					<pubDate>Tue, 09 Dec 2014 08:41:08 +0000</pubDate>
					<dc:creator>Mark M</dc:creator>

					<description>
						<![CDATA[
						<p>I have just noticed a problem with the custom css to make the categories show in the breadcrumbs, it doesn&#8217;t show any sub categories.</p>
<p>For instance a product is in the category Mirrors, but in the sub category of Convex (which has mirrors as a parent). </p>
<p>Currently when you enter the sub category the breadcrumb goes to;</p>
<p>Collections/Convex</p>
<p>Can the custom css be changed so that it would read;</p>
<p>Collections/Mirrors/Convex</p>
<p>Edit to add: I original posted this on anther wrong thread and got the response that it required custom development.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-161249</guid>
					<title><![CDATA[Reply To: How to feature product category in breadcrumbs]]></title>
					<link>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-161249</link>
					<pubDate>Tue, 09 Dec 2014 16:30:51 +0000</pubDate>
					<dc:creator>Zeshan</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Mark,</p>
<p>Thanks for writing in!</p>
<p>This can be possible with custom development but unfortunately, the customization of it will fall beyond the scope of support we can provide. if you require more in depth changes to the breadcrumbs, you may wish to consult with a developer. X is quite extensible with child themes, so there are plenty of possibilities.</p>
<p>Thanks for understanding. Take care!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-645452</guid>
					<title><![CDATA[Reply To: How to feature product category in breadcrumbs]]></title>
					<link>https://theme.co/archive/forums/topic/how-to-feature-product-category-in-breadcrumbs/#post-645452</link>
					<pubDate>Thu, 29 Oct 2015 22:56:22 +0000</pubDate>
					<dc:creator>alexdigital</dc:creator>

					<description>
						<![CDATA[
						<p>I too need the breadcrumbs to work correctly and show the full structure when products are in sub-categories.</p>
<p>Surely it must just be an adjustment to the functions.php code you provided earlier?</p>
<p>Let me know,</p>
<p>-Alex</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

