• Resolved Designrest

    (@designrest)


    $loop = new WP_Query( array(
    ‘post_type’ => ‘my_post_type’,
    ‘posts_per_page’ => 12,
    ‘orderby’ => ‘post_date’,
    ‘s’ => ‘search_term’
    ));

    result show all post type and ‘s’ => ‘search_term’ not working

Viewing 1 replies (of 1 total)
  • Plugin Author Sumit Singh

    (@5um17)

    Hi,

    That is whole point of this plugin. Once you pass the s parameter the WPES settings takes effect instead of query parameter you are passing.

    The post type, order by and number of posts all of things you can control from WPES settings.

    If you do not want WPES to take control of query you can disable it by passing disable_wpes in WP_Query. See https://wpes.secretsofgeeks.com/hooks#disable_wpes

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘function WP_Query not correct’ is closed to new replies.