Title: Post types for some posts are wrong
Last modified: March 19, 2019

---

# Post types for some posts are wrong

 *  [BertPC](https://wordpress.org/support/users/bertpc/)
 * (@bertpc)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/post-types-for-some-posts-are-wrong/)
 * Hi there. We’ve been a happy user of Relevanssi Pro for some time now, though
   we did fall off the Premium bandwagon (cost-cutting measures.. :/ ). We’ve noticed
   that, in our search results — which include pages, posts, and users (member profiles)—
   the post type that comes back from get_post(id) is different than the post type
   we see in the debug output we put in lib/search.php within the Relevanssi plugin
   code (to troubleshoot).
 * So, we know the search results are correct, but when our content.php is called
   to display each of the results within the loop, the post type we get back for
   only some user records when we call get_post, can be either “product_variation”
   or “blocks”. Everything else about the user record seems fine, but something 
   is getting lost in translation during the loop.
 * I understand you can’t login to the site since we’re not a Premium member, but
   if you have ideas on where I could focus my debugging/research, I’d greatly appreciate
   it! This is lower-level than I’ve had to work within the WordPress code.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/post-types-for-some-posts-are-wrong/#post-11333060)
 * I’m not allowed to support Premium users here, so I can’t go into detail here
   since you’re asking about a Premium feature (searching user profiles), but in
   short, for user profiles to work correctly, I would recommend using `relevanssi_get_post()`–
   it will get you a post object with the correct post type for user profiles as
   well.
 * For further questions about this feature, please go to [Premium support](https://www.relevanssi.com/support).

Viewing 1 replies (of 1 total)

The topic ‘Post types for some posts are wrong’ is closed to new replies.

 * ![](https://ps.w.org/relevanssi/assets/icon-256x256.png?rev=3529670)
 * [Relevanssi - A Better Search](https://wordpress.org/plugins/relevanssi/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/relevanssi/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/relevanssi/)
 * [Active Topics](https://wordpress.org/support/plugin/relevanssi/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/relevanssi/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/relevanssi/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/post-types-for-some-posts-are-wrong/#post-11333060)
 * Status: not resolved