• Resolved lucafr

    (@lucafr)


    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

    (@dondon-benjamincouk)

    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

    (@dondon-benjamincouk)

    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.