Title: Custom post type in function params
Last modified: June 17, 2019

---

# Custom post type in function params

 *  Resolved [trytofinderror](https://wordpress.org/support/users/trytofinderror/)
 * (@trytofinderror)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/custom-post-type-in-function-params/)
 * Hi!
 * I have 3 custom post types: cpt1, cpt2, cpt3.
 * Is there way to display related posts of cpt1 on cpt2 posts and related posts
   of cpt3 only on cpt3 posts?

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

 *  Thread Starter [trytofinderror](https://wordpress.org/support/users/trytofinderror/)
 * (@trytofinderror)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/custom-post-type-in-function-params/#post-11644293)
 * sorry
    the way is: `yarpp_related(array("post_type" => array('post_type')), get_the_ID(),
   true);`
 * thx
 *  Plugin Support [Michael Nelson](https://wordpress.org/support/users/mnelson4/)
 * (@mnelson4)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/custom-post-type-in-function-params/#post-11645926)
 * 👍 you got it! Of course I don’t know where that’s documented anymore. How did
   you find it?
    -  This reply was modified 6 years, 11 months ago by [Michael Nelson](https://wordpress.org/support/users/mnelson4/).
      Reason: add tag

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

The topic ‘Custom post type in function params’ is closed to new replies.

 * ![](https://ps.w.org/yet-another-related-posts-plugin/assets/icon-256x256.png?
   rev=2549977)
 * [YARPP - Yet Another Related Posts Plugin](https://wordpress.org/plugins/yet-another-related-posts-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yet-another-related-posts-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Michael Nelson](https://wordpress.org/support/users/mnelson4/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/custom-post-type-in-function-params/#post-11645926)
 * Status: resolved