-
AuthorPosts
-
November 5th, 2014 at 14:08 #28092Arden Kirkland
Hello!
I’ve enabled the custom post type feature of the Jetpack plugin, and I’m using the Portfolio post type. For Portfolio Projects you can create custom project types and project tags. I’m wondering how to add my project types (like categories) and my list of project tags (like regular tags) to the individual pages for each project. Can anyone suggest which file(s) I need to modify, and with what changes?
The changes would be for a page like http://www.ardenkirkland.com/work/portfolio/cataloging/
I believe this is using the regular single.php file within the Mantra theme, but I could be wrong. I’ve seen instructions at http://stackoverflow.com/questions/25266680/using-jetpack-portfolio-project-in-wordpress-child-theme-does-not-call-archive-c . According to that I may want to create a single-jetpack-portfolio.php page, but I wouldn’t know what to add to it.
In the Mantra settings, I have all Post Information Settings set to “Show” (except for the time), so categories and tags do show on my regular posts.
Thanks for any help anyone can offer! I’m a huge fan of the Mantra theme and use it all the time – usually I can change anything I want with the standard settings, but this issue has me stumped. Also, getting this portfolio done is rather urgent as I will link to it in a job application I have to submit tomorrow!
January 23rd, 2015 at 12:49 #29241Ed WainHey, I don’t know if you ever got an answer to this, but I think this is the same problem I just ran into. I wanted to call in the project type as if it were a category, but the “get_the_categories” function didn’t work on the custom taxonomy. I posted my question, and subsequent answer, here on Stack Overflow, but basically, there is a function called “the_terms” which can call in custom taxonomies, such as the project type and project tags. It requires two parameters: ID, and taxonomy name.
<?php the_terms( $id, $taxonomy ); ?>
You can find the taxonomy names here, on the Github repo, right at the top, where it says:
const CUSTOM_TAXONOMY_TYPE = 'jetpack-portfolio-type'; const CUSTOM_TAXONOMY_TAG = 'jetpack-portfolio-tag';
so the code you want should be something like:
<?php the_terms($post->ID, 'jetpack-portfolio-type' <?php the_terms($post->ID, 'jetpack-portfolio-tag'
This should call the project type and the project tags, respectively. You will probably want to put this code in a “single-jetpack-portfolio.php” file, so that it only calls it on project pages, but you could instead just use conditional code (if else) in the “single.php” file.
This advice is coming from a beginner, so if it doesn’t work, hopefully it at least points you in the right direction.
-
AuthorPosts
The topic ‘add project tags to project page – jetpack portfolio’ is closed to new replies.