Title: post_type condition
Last modified: February 28, 2020

---

# post_type condition

 *  Resolved [lucafr](https://wordpress.org/support/users/lucafr/)
 * (@lucafr)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/post_type-condition/)
 * Hi, my problem is that the plugin make a set of query (inspected by Query monitor)
   where never have post_type condition = post …
 * This is one of queries:
 *     ```
       SELECT wp2018_posts.*
       FROM wp2018_posts
       LEFT JOIN wp2018_postmeta AS wpcfs1_1
       ON wpcfs1_1.meta_key='autore'
       AND wpcfs1_1.post_id = wp2018_posts.id
       WHERE 1=1
       <strong>AND wp2018_posts.post_type = 'us_page_block'</strong>
       AND ((wp2018_posts.post_status <> 'trash'
       AND wp2018_posts.post_status <> 'auto-draft'))
       AND ( (wpcfs1_1.meta_value LIKE '%Altramente%') )
       ORDER BY wp2018_posts.post_title ASC
       ```
   
 * It is correct query in field name and input typed but if I run on phpMyadmin 
   i have to change condition
    **AND wp2018_posts.post_type = ‘us_page_block’** 
   in **AND wp2018_posts.post_type = ‘post’** to have correct result. Can you help
   me in solve thsi problem? I’m running WordPress 5.3.2 on php 7, just tried disabling
   all other plugins and theme… Thanks in advanced

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

 *  Plugin Author [don benjamin](https://wordpress.org/support/users/dondon-benjamincouk/)
 * (@dondon-benjamincouk)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/post_type-condition/#post-12524779)
 * Hi,
 * I’m not sure where that clause would be coming from. If you haven’t explicitly
   set a post_type field in the wp-custom-field-search form then it shouldn’t be
   filtering on post_type.
 * Where have you set up the post type `us_page_block`? Is that coming from another
   plugin?
 * Thanks,
    Don
 *  Plugin Author [don benjamin](https://wordpress.org/support/users/dondon-benjamincouk/)
 * (@dondon-benjamincouk)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/post_type-condition/#post-12540941)
 * I’m still not sure where your `post_type` clause is coming from but the latest
   release of the plugin includes options to configure which post types are displayed,
   these are configured in the form settings for each form. In the admin area click
   the little cog icon at the top right of the form.

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

The topic ‘post_type condition’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-custom-fields-search_ffffff.svg)
 * [WP Custom Fields Search](https://wordpress.org/plugins/wp-custom-fields-search/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-custom-fields-search/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-custom-fields-search/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-custom-fields-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-custom-fields-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-custom-fields-search/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [don benjamin](https://wordpress.org/support/users/dondon-benjamincouk/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/post_type-condition/#post-12540941)
 * Status: resolved