Category in Single Portfolio Page

This is a PRIVATE forum for verified users only, to view all replies/answers, you must be logged in!

Status: not resolved
  • This topic has 6 replies, 3 voices, and was last updated 6 y, 5 mo by  wpthms.
Viewing 5 reply threads
  • Author
    Posts
    • #2477

      Hello, i want do display the portfolio category in the single portfolio site.

      I use the following code.

      <?php echo $the_category;?>

      but nothings works?

      do you have the right code ?

    • #2483

      hellop, i need info for this case!!!!

    • #2486

      hello, i put this code in the single-portfolio template

      <?php
      $terms = get_the_terms( $post->ID, '<strong>portfolio-type</strong>' );
      						
      if ( $terms && ! is_wp_error( $terms ) ) : 
      
      	$draught_links = array();
      
      	foreach ( $terms as $term ) {
      		$draught_links[] = $term->name;
      	}
      						
      	$on_draught = join( ", ", $draught_links );
      ?>
      
      <p class="beers draught">
      	On draught: <span><?php echo $on_draught; ?></span>
      </p>
      
      <?php endif; ?>

      BUT NOTHING WORKS!!!

    • #2489

      Max
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #2496

      TOP!

    • #2498

      wpthms
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #2484

      Max
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

Viewing 5 reply threads
  • You must be logged in to reply to this topic.

This is a PRIVATE forum for verified users only, to view all replies/answers, you must be logged in!

© Copyright 2020 by wpthms.com. All Rights Reserved.