Breadcrumbs Text/Link Change

How do I make the breadcrumbs only output the Title of the current page?

Example page, remove “shop” for this staging url? http://www.bloodtesting.stagingdomain.xyz/?product=blood-test

And remove the link from the page title to itself?

Hi @allcal,

Thank you for writing in, please add this to Theme Options > CSS

/*remove home in breadcrumbs*/
.x-breadcrumb-wrap a:nth-of-type(2n) {
display: none;
}

/*disbale links in breadcrumbs*/
.x-breadcrumbs .current {
pointer-events: none;
cursor: default;
}

You can find the proper CSS code selector using the Chrome browser Developer Toolbar
For the CSS code itself, I suggest that you get started with this tutorial

Hope it helps,
Cheers!

So that does work, but then on other pages (not product pages) the nth-of-type(2n) is the current page title and then the breadcrumbs show nothing.

I was hoping for a fix editing the actual template file so only to show the current page title. Also possibly change the current page title in the breadcrumbs to the “h1” title tag for design purposes.

Hi @allcal,

If that is what you want, no need to edit current breadcrumb. Please remove above custom CSS and disabled breadcrumbs from Theme Options > Header. What you are trying to achieve is just display current page title no links at all just below the menu. We do have that already, the landmark template.

Open this file from your wordpress installation:
\wp-content\themes\x\framework\legacy\cranium\headers\views\integrity\wp-header.php
Copy it on the same folder path on your child theme here:
\wp-content\themes\x-child\framework\legacy\cranium\headers\views\integrity\wp-header.php
You might need to create the entire folder path on your child theme.

Open the copied file and look for this line:
<?php x_get_view( 'integrity', '_landmark-header' ); ?>
Move that line just below this line:
<?php x_get_view( 'integrity', '_breadcrumbs' ); ?>

Then repeat the same process for this file \wp-content\themes\x\framework\legacy\cranium\headers\views\integrity\_landmark-header.php

Once you have copied _landmark-header.php on your child theme, please edit it as needed. That is the template file for page titles. Now, page titles for product is not included there, you might need to add another filter for products page like this:

<?php elseif ( x_is_product() ) : ?>

      <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span>Shop</span></h1>
    <p class="p-landmark-sub"><span><?php the_title(); ?></span></p>
  </header>

Hope this helps. Further customization from here would be getting into custom development that is outside the scope of our support. Thank you for understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.