Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter art2com

    (@art2com)

    Hello mcsupport,

    deactivating and re-activating has solved the pbm.

    Thank you for your help,

    Renato

    Thread Starter art2com

    (@art2com)

    Hello,

    thank you for your help.

    The display problem was due to the cache. We have disabled it and it works.

    Here is the code working :
    /**
    * Joins the Post Meta table. Filters bsearch_posts_join.
    *
    * @param string $join
    * @return string
    */
    function filter_bsearch_posts_join( $join ) {
    global $wpdb;
    $new_join = $join . “INNER JOIN $wpdb->postmeta ON ($wpdb->posts.ID = $wpdb->postmeta.post_id)”;
    return $new_join;
    }
    add_filter( ‘bsearch_posts_join’, ‘filter_bsearch_posts_join’ );

    /**
    * Checks the ‘_visibility’ meta key for ‘visible’ meta_value. Filters bsearch_posts_where.
    *
    * @param string $join
    * @return string
    */
    function filter_bsearch_posts_where( $where ) {
    global $wpdb;
    $new_where = $where . ” OR ( wpit_posts.post_status IN (‘publish’, ‘future’) AND ( $wpdb->postmeta.meta_key = ‘numero_post’ AND $wpdb->postmeta.meta_value = ‘”. get_search_query() . “‘ ))”;
    return $new_where;
    }
    add_filter( ‘bsearch_posts_where’, ‘filter_bsearch_posts_where’ );

    Have a great day,

    Renato

    Thread Starter art2com

    (@art2com)

    Hello,
    thank you for your answer.
    I have added this code to function.php and adapted it but it doesn’t seem to be used by the plugin.
    I event put some prints inside and they are not printed.
    What do I do Wrong ?
    Thank you,
    Renato

    • This reply was modified 7 years, 11 months ago by art2com.
Viewing 3 replies - 1 through 3 (of 3 total)