WordPress.org

Ready to get started?Download WordPress

Forums

Portfolio Post Type
Display Portfolio Category and Tags (5 posts)

  1. shawn00m
    Member
    Posted 1 year ago #

    How would I show the category and tags for a portfolio item in my portfolio template? I tried this:

    <?php portfolio_category(); ?>

    But it didn't work. Ideas?

    http://wordpress.org/extend/plugins/portfolio-post-type/

  2. chomachomachoma
    Member
    Posted 1 year ago #

    Perhaps this will do the trick for you?

    List Categories
    <?php echo get_the_term_list( $post->ID, 'portfolio_category', 'Categorized: ', ', ', '' ); ?>

    List Tags
    <?php echo get_the_term_list( $post->ID, 'portfolio_tag', 'Tagged: ', ', ', '' ); ?>

    REF: http://codex.wordpress.org/Function_Reference/get_the_term_list

  3. bryananthonylewis
    Member
    Posted 10 months ago #

    Another way to do it would be like this...

    echo get_the_term_list( get_the_ID(), 'portfolio_category', "Category: " ); 
    
    echo get_the_term_list( get_the_ID(), 'portfolio_tag', "Tags: " );
  4. rcjr24
    Member
    Posted 9 months ago #

    @chomachomachoma & bryananthonylewis

    Is there a short code for this?... lets say i would insert the short code on my widget.. and one more thing, i used what you've suggest, but it appears only one category and it was "Education", and I inspect the element and it is linked to "http://localhost/wordpress/portfolio_category/education/" which it must be linked to like this "http://localhost/wordpress/portfolio/education/". Why is it that?

  5. Gary Jones
    Member
    Posted 7 months ago #

    rcjr24,

    You can filter portfoliopost_type_category_args to change the rewrite slug value to whatever you want, but since the single portfolio entries have the rewrite slug of 'portfolio', then I don't think you can choose exactly that and still have it working for taxonomy terms as well.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic