Public Ticket #1026527 Php code to displaying portfolio category name in portfolio detail page. Closed
Comments 2cidcreatives started the conversationJanuary 18, 2017 at 7:02pmPhp code for displaying portfolio category name in portfolio detail page?Tried the following:<?php the_category();?><?php $categories = get_the_category();foreach ( $categories as $category ) {echo $category;}?><?php$category = implode(" ", get_the_terms( get_the_ID(), 'portfolio_entries' ) );echo $category;?><?php foreach((get_the_category()) as $category) { echo $category->cat_name . ' '; } ?><?php echo esc_html( $sub_category;?>[deleted] repliedJanuary 19, 2017 at 5:41pmHi,Where do you want to display portfolio categories, in loop page or single project page?Probably give me the URL of that page so I can figure out a solution for you. Sign in to reply ...
Php code for displaying portfolio category name in portfolio detail page?
Tried the following:
<?php the_category();?>
<?php $categories = get_the_category();foreach ( $categories as $category ) {echo $category;}?>
<?php
$category = implode(" ", get_the_terms( get_the_ID(), 'portfolio_entries' ) );
echo $category;
?>
<?php foreach((get_the_category()) as $category) { echo $category->cat_name . ' '; } ?>
<?php echo esc_html( $sub_category;?>
Hi,
Where do you want to display portfolio categories, in loop page or single project page?
Probably give me the URL of that page so I can figure out a solution for you.