current portfolio category

This topic contains 1 reply, has 2 voices, and was last updated by  CTHthemes 4 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #14973

    sigfont
    Participant

    Supported

    . how do I output the current portfolio category , I need to display it inside the breadcrumbs, in single- portfolio-page I have looked over and over but didn’t find it in functions.php.

    #14982

    CTHthemes
    Keymaster

    Here it is: http://prntscr.com/g38it7

    in monolit_breadcrumbs function.

    You can check if $post_type is portfolio
    then use wp_get_post_terms to get portfolio_cat term.

    
    $terms = wp_get_post_terms( get_the_ID() , 'portfolio_cat' );
    

    https://codex.wordpress.org/Function_Reference/wp_get_post_terms

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.