Title: PHP and categories
Last modified: November 9, 2023

---

# PHP and categories

 *  Resolved [jasonliv](https://wordpress.org/support/users/jasonliv/)
 * (@jasonliv)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/php-and-categories/)
 * Hi there, I have a pod set up called locomotive_class. Each locomotive_class 
   record has a single engineer that has been set up with a custom taxonomy – in
   this case a category called Engineers.
 * I’m using the following to fetch the list.
   _$params = array(‘orderby’ => ‘year\
   _from’,);$mypod = pods( ‘locomotive\_class’, $params );while ( $mypod->fetch()){}
 * Can you tell me how I’d also pick up that custom engineer category so I can display
   that along with the locomotive record?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * (@keraweb)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/php-and-categories/#post-17190977)
 * Hi [@jasonliv](https://wordpress.org/support/users/jasonliv/)
 * There are different ways to do this.
   Since you already use Pods functions you
   could just call `$mypod->field('taxonomy_name');`
 * See docs:
   [https://docs.pods.io/code/pods/field/](https://docs.pods.io/code/pods/field/)
   [https://docs.pods.io/code/pods/field/field-notation-options/](https://docs.pods.io/code/pods/field/field-notation-options/)
 * Cheers, Jory
 *  Thread Starter [jasonliv](https://wordpress.org/support/users/jasonliv/)
 * (@jasonliv)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/php-and-categories/#post-17212610)
 * Thank you, that was perfect.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP and categories’ is closed to new replies.

 * ![](https://ps.w.org/pods/assets/icon.svg?rev=3286397)
 * [Pods - Custom Content Types and Fields](https://wordpress.org/plugins/pods/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pods/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pods/)
 * [Active Topics](https://wordpress.org/support/plugin/pods/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pods/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pods/reviews/)

## Tags

 * [categories](https://wordpress.org/support/topic-tag/categories/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 2 replies
 * 2 participants
 * Last reply from: [jasonliv](https://wordpress.org/support/users/jasonliv/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/php-and-categories/#post-17212610)
 * Status: resolved