Title: If Conditional with Relationship Fields
Last modified: March 12, 2026

---

# If Conditional with Relationship Fields

 *  Resolved [junkes](https://wordpress.org/support/users/junkes/)
 * (@junkes)
 * [1 month ago](https://wordpress.org/support/topic/if-conditional-with-relationship-fields/)
 * Hey,
 * First, I would like to know if it’s possible to use the “If Comparisons” with
   relationship fields and second if it’s possible to compare two relationship fields.
   Something like [if artist_a=”{@artist_b}”], to see if both fields have the same
   artist connected (both being relationship fields in a song CPT, for example).

Viewing 1 replies (of 1 total)

 *  Plugin Support [pdclark](https://wordpress.org/support/users/pdclark/)
 * (@pdclark)
 * [1 week, 6 days ago](https://wordpress.org/support/topic/if-conditional-with-relationship-fields/#post-18867337)
 * No, for comparing multi-dimensional data structures, either separate the templates
   out into Pods queries filtered with `where` SQL statements and `IN( ... )`, or
   use PHP / custom shortcodes with array comparisons.
 * See:
    - [https://docs.pods.io/displaying-pods/pods-shortcode/](https://docs.pods.io/displaying-pods/pods-shortcode/)(
      where argument)
    - [https://docs.pods.io/code/pods/find/](https://docs.pods.io/code/pods/find/)(
      where syntax examples)
    - [https://www.w3schools.com/mysql/mysql_in.asp](https://www.w3schools.com/mysql/mysql_in.asp)(
      MySQL IN() statement)
    - [https://www.php.net/manual/en/ref.array.php](https://www.php.net/manual/en/ref.array.php)(
      PHP array functions)
    - [https://developer.wordpress.org/reference/functions/add_shortcode/](https://developer.wordpress.org/reference/functions/add_shortcode/)(
      WordPress add shortcode)

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fif-conditional-with-relationship-fields%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](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/)

 * 2 replies
 * 2 participants
 * Last reply from: [pdclark](https://wordpress.org/support/users/pdclark/)
 * Last activity: [1 week, 6 days ago](https://wordpress.org/support/topic/if-conditional-with-relationship-fields/#post-18867337)
 * Status: resolved