verygoodplugins

Untitled

Feb 19th, 2021
639
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function wpf_breadcrumbs() {
  2.  
  3.     $category = get_query_var( 'documentation_category' );
  4.     $category_term = get_term_by( 'slug', $category, 'documentation_category' );
  5.  
  6.     if ( empty( $category_term ) ) {
  7.         return;
  8.     }
  9.  
  10.     ob_start();
  11.  
  12.     ?>
  13.  
  14.     <ul class="pp-breadcrumbs">
  15.         <li class="pp-breadcrumbs-item pp-breadcrumbs-item-cat">
  16.             <a class="pp-breadcrumbs-crumb pp-breadcrumbs-crumb-link pp-breadcrumbs-crumb-cat" href="<?php echo home_url()?>/documentation/">Documentation</a>
  17.         </li>
  18.         <li class="pp-breadcrumbs-separator">
  19.             <span class="pp-breadcrumbs-separator-text">/</span>
  20.         </li>
  21.         <li class="pp-breadcrumbs-item pp-breadcrumbs-item-cat">
  22.             <a class="pp-breadcrumbs-crumb pp-breadcrumbs-crumb-link pp-breadcrumbs-crumb-cat" href="<?php echo home_url()?>/documentation/#<?php echo $category_term->slug ?>"><?php echo $category_term->name ?></a>
  23.         </li>
  24.         <li class="pp-breadcrumbs-separator">
  25.             <span class="pp-breadcrumbs-separator-text">/</span>
  26.         </li>
  27.         <li class="pp-breadcrumbs-item pp-breadcrumbs-item-cat">
  28.             <?php the_title(); ?>
  29.         </li>
  30.     </ul>
  31.  
  32.     <?php
  33.  
  34.     return ob_get_clean();
  35.  
  36. }
  37.  
  38. add_shortcode( 'wpf_breadcrumbs', 'wpf_breadcrumbs' );
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×