Your account expired support, please renew to get your support.

HomePage Forums Themes Support Umimo – Furniture Store WordPress Theme Search for the rest of the things instead of products

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #24154
    hmkitchen
    Support Expired

    Hi,

    I noticed that the search function only searches for products. Since my website doesn’t have any products, but only portfolios, I would like to change the search query to search for portfolios only.

    I have added this code in functions.php

    function SearchFilter($query) {
        if ($query->is_search) {
            $query->set('post_type', 'umimo_portfolio');
        }
        return $query;
    }
    add_filter('pre_get_posts','SearchFilter');

    But the search results on type are not showing anymore

    As well as the placeholder text “Search products” to “Search portfolios”.

    #24169

    Ok, I resolved this issue, please recheck your site.

    #24200
    hmkitchen
    Support Expired

    As you can see, the link is incorrect and does not point to my website’s internal link.

    #24203

    Oh sorry, I fixed this issue, please recheck.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.