Skip to content

Instantly share code, notes, and snippets.

@dryan1144
Last active November 9, 2015 01:21
Show Gist options
  • Save dryan1144/36812d389e77f5acf628 to your computer and use it in GitHub Desktop.
Save dryan1144/36812d389e77f5acf628 to your computer and use it in GitHub Desktop.
<?php if (is_product() || is_cart() || is_checkout() || is_wc_endpoint_url('order-received')) {
if (is_product()) {
echo '<h1>Register</h1>';
} elseif (is_cart()) {
echo '<h1>Review Order</h1>';
} elseif (is_wc_endpoint_url('order-received')) {
echo '<h1>Confirmation</h1>';
} elseif (is_checkout()) {
echo '<h1>Checkout</h1>';
} else {
the_title('<h1>','</h1>');
} ?>
<ul class="breadcrumbs woocommerce">
<li>
<strong<?php if (is_product()) echo ' class="active"';?>><span>Step 1:</span> Register</strong>
</li>
<li>
<strong<?php if (is_cart()) echo ' class="active"';?>><span>Step 2:</span> Review Order</strong>
</li>
<li>
<strong<?php if (is_checkout()&&!is_wc_endpoint_url('order-received')) echo ' class="active"';?>><span>Step 3:</span> Checkout</strong>
</li>
<li>
<strong<?php if (is_wc_endpoint_url('order-received')) echo ' class="active"';?>><span>Step 4:</span> Confirmation</strong>
</li>
</ul>
<?php } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment