0
votes

I'm using the Jetpack plugin with Wordpress. I've got the portfolio post type working, but now I'm trying to call the project type to display in my content-jetpack-portfolio-single.php file. Apparently, project types and project tags are custom taxonomies, so the usual calls for categories and tags aren't working.

The Github repo uses the following code, but it's throwing up an undefined function error.

get_project_type();

I then found this link, which claims to display the project type with:

Jetpack_Portfolio::get_project_type( $post_id );

This produces no PHP error, but also no content, even after triple-checking the ID parameter.

I'm using Underscores as my base theme, and this code is being entered inside the loop.

1

1 Answers

2
votes

Well, after a bit more hunting in the Wordpress forums, I think I found a solution, in the way of:

the_terms($post->ID, 'jetpack-portfolio-type');

Hopefully this will help anyone who is having similar problems. I had not encountered "the_terms" before, and after finding the custom taxonomy type name from here, it suddenly worked.

(Did I mention that I'm new to this.)