WordPress.org

Ready to get started?Download WordPress

Forums

Filterable jQuery Portfolio/Gallery
[resolved] Call Category of the post (2 posts)

  1. yuncreativelabs
    Member
    Posted 5 months ago #

    Hello guys,
    I'm no php expert and I was wondering if anybody here could help me figuring out a really simple line of code.
    In each one of my items page inside the Portfolio, I would like to dynamically show the category that post belongs to: any help?

    Thanks a lot!

    http://wordpress.org/plugins/nimble-portfolio/

  2. Nimble3
    Member
    Plugin Author

    Posted 5 months ago #

    $term_list = wp_get_post_terms($post_id, 'nimble-portfolio-type', array("fields" => "names"));

    $term_list now contains the array of all the categories (item types) attached to this post (make sure $post_id contains the correct post id)

Reply

You must log in to post.

About this Plugin

About this Topic