Showing the project type in HREF

It looks like the $project_type variable is not defined anywhere in the scope of your artwork page. You have to look into how to get the artwork’s project type on the artwork page. Is it a custom taxonomy? If yes, you would use functions like get_the_terms. I don’t know what the project type taxonomy is … Read more

Am I using an action hook correctly?

… (although I found it strange that I didn’t need to write activation or deactivation code…). You don’t need activation of deactivation code unless there is something you need to do on activation or deactivation. I tested my plugin by using a simple echo ‘fd is running’; which strangely shows up at the top of … Read more

Custom Post Type

You can use wp_get_post_terms() to pull the terms. $taxonomy = ‘project-category’; $terms = wp_get_post_terms( $post->ID, $taxonomy); var_dump($terms); wp_get_post_terms() will return an array of terms because multiple terms may be assigned to a single post. This means that you will potentially get a set of terms, not just one, so you will need to choose which … Read more