Home › Forums › WoodMart support forum › Relevansi plugin + Ajax Search for Everyone › Reply To: Relevansi plugin + Ajax Search for Everyone
newsprince
It’s not a snippet. You have to manually delete and add some code, but beware. In every theme update you have to apply the same settings.
So 1st go to:
/wp-content/themes/woodmart/inc/builder/elements/Search.php
and delete the following code from line 119 to 140
'post_type' => array(
'id' => 'post_type',
'title' => esc_html__( 'Post type', 'woodmart' ),
'type' => 'selector',
'tab' => esc_html__( 'General', 'woodmart' ),
'value' => 'product',
'options' => array(
'product' => array(
'value' => 'product',
'label' => esc_html__( 'Product', 'woodmart' ),
),
'post' => array(
'value' => 'post',
'label' => esc_html__( 'Post', 'woodmart' ),
),
'portfolio' => array(
'value' => 'portfolio',
'label' => esc_html__( 'Portfolio', 'woodmart' ),
),
),
'description' => esc_html__( 'You can set up the search for posts, projects or for products (woocommerce).', 'woodmart' ),
),
2nd go to:
/wp-content/themes/woodmart/inc/modules/search.php
In line 194 replace the
$post_type = 'product';
with this code
$post_type = array('post', 'product', 'portfolio');
After that go to your header builder. Open your header go to the search widget click edit save and lastly save header.
Clear cache and go make a search.
Now you should see products posts portfolio items as long as you have indexed them with relevanssi