Title: remove the &#8220;AND&#8221;
Last modified: November 18, 2018

---

# remove the “AND”

 *  Resolved [alexnn](https://wordpress.org/support/users/alexnn/)
 * (@alexnn)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/remove-the-and/)
 * Hi,
    When I use {@related.ID} I get 332732, 332733, 332734, and 332735. I need
   only a list of IDs. So, how to remove the “AND”?
 * Thanks on advance.
    Alex

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

 *  Plugin Contributor [Jim True](https://wordpress.org/support/users/jimtrue/)
 * (@jimtrue)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/remove-the-and/#post-10893269)
 * Loop through them with `[each related]{@ID}[/each]`
 * That will get you the ID’s individually. What are you wanting to send those ID’s
   into, however?
 *  Thread Starter [alexnn](https://wordpress.org/support/users/alexnn/)
 * (@alexnn)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/remove-the-and/#post-10893348)
 * Yes, these IDs then I want to use in the code and “AND” prevents it
 *  Thread Starter [alexnn](https://wordpress.org/support/users/alexnn/)
 * (@alexnn)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/remove-the-and/#post-10897988)
 * Hello Jim True,
    So, how could I remove the “AND” without using [each related]?
   Maybe some snippet could help me?
 *  Plugin Contributor [Jim True](https://wordpress.org/support/users/jimtrue/)
 * (@jimtrue)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/remove-the-and/#post-10899445)
 * Are you displaying the ID’s or are you using them to be placed into something
   else. That’s what I was wondering, ie if you’re using the ID’s to be sent into
   another shortcode, etc.
 * If the latter, then you probably just want to process the posts with PHP instead.
 *  Thread Starter [alexnn](https://wordpress.org/support/users/alexnn/)
 * (@alexnn)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/remove-the-and/#post-10901842)
 * Hello,
    I use the ID’s to be sent into another shortcode
 *  Plugin Contributor [Jim True](https://wordpress.org/support/users/jimtrue/)
 * (@jimtrue)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/remove-the-and/#post-10903442)
 * That’s what I thought, you’re probably going to have to a PHP output filter to
   send the value in the field into a PHP function to return the value in the format
   you’re wanting.
 * ie, if you pass {@related} to a PHP function, it will pass that as an array, 
   so you could do `{@related,join_with_commas}` and put the following function 
   in your functions.php (or somewhere in your own plugin, etc.):
 *     ```
       function join_with_commas ( $array ) {
           return implode( ",",$array );
       }
       ```
   
 * `implode` will join the values of the array with the character intended. Since
   the relationship magic tag stores the ID’s of the connected post types, this 
   _should_ work, but you might want to test yourself. I’m not by any means a PHP
   Developer 😉
 *  Thread Starter [alexnn](https://wordpress.org/support/users/alexnn/)
 * (@alexnn)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/remove-the-and/#post-10920611)
 * Hello Jim,
    Thank you so much for leading me on the right path. I twisted and
   changed this code for about 3 days… and I did it with function with_commas and{
   @related.ID,with_commas}! p.s. I’m not a PHP Developer too, I’m just an energy
   engineer )
 *  Thread Starter [alexnn](https://wordpress.org/support/users/alexnn/)
 * (@alexnn)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/remove-the-and/#post-10922540)
 * Hello Jim,
    and next, how to get taxonomies (‘category’) term id for {@related}
   and separate them with commas? I mean some function , something like this {@related.
   category.term_id,with_commas}
    -  This reply was modified 7 years, 6 months ago by [alexnn](https://wordpress.org/support/users/alexnn/).
 *  Plugin Contributor [Jim True](https://wordpress.org/support/users/jimtrue/)
 * (@jimtrue)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/remove-the-and/#post-10925278)
 * You should be able to use the same method; if that’s WordPress’s default categories,
   that would be `post_category.term_id`.
 * PS: I’m not a PHP developer either, I just play one on Support 😉
 *  Plugin Contributor [Jim True](https://wordpress.org/support/users/jimtrue/)
 * (@jimtrue)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/remove-the-and/#post-10925286)
 * Just realized you’ve resolved your question so marking it resolved.

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

The topic ‘remove the “AND”’ 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/)

 * 10 replies
 * 2 participants
 * Last reply from: [Jim True](https://wordpress.org/support/users/jimtrue/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/remove-the-and/#post-10925286)
 * Status: resolved