Advertisement
Guest User

Untitled

a guest
Sep 29th, 2021
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. add_action('salient_portfolio_hook_single_before_content','salient_child_single_project_breadcrumbs');
  2.  
  3. function salient_child_single_project_breadcrumbs() {
  4.  
  5. global $post;
  6.  
  7. $terms = get_the_terms($post->id,"project-type");
  8.  
  9. if ( isset($terms[0]) ){
  10. echo '<style>#project-breadcrumbs {
  11. display: flex;
  12. margin: 30px 0;
  13. }
  14. #project-breadcrumbs li{
  15. list-style: none;
  16. margin-right: 15px;
  17. }</style>';
  18.  
  19. echo '<ul id="project-breadcrumbs">
  20. <li><a href="http://www.finleydesignarch.com/portfolio/?grid-filter='.strtolower(str_replace(' ','-',$terms[0]->name)).'">Portfolio</a></li>
  21. <li>&raquo;</li>
  22. <li>'.get_the_title().'</li>
  23. </ul>';
  24. }
  25.  
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement