Viewing 15 posts - 1 through 15 (of 15 total)
  • #40311
    DAPPER-tekstenweb
    Member
    Post count: 174

    Hi,

    On my website galerietje.emeticus.nl, the search function does not seem to search in products, only news(blog)articles and pages show up. For example, one of the artists in my shop is named Wouter Tulp. This name is also used as a product category and shows up in the description of the product. But, when I perform a search on this name, only the news articles and his page.

    I would like to show the products as well. What am I doing wrong?

    #40678
    Melanie – SUPPORT
    Member
    Post count: 11032

    Hi
    Can you post up the URL to a page where this is happening so I can check it out directly?
    Thanks!

    #40871
    DAPPER-tekstenweb
    Member
    Post count: 174

    galerietje.emeticus.nl

    #40964
    supreme87
    Member
    Post count: 39

    I have the same problem. If I use the search box I see products, blog, page post etc. I like to show only products
    so go to mydomain.com/?s=XXX&post_type=product instead of mydomain.com/?s=XXX
    Thanks

    #41504
    Melanie – SUPPORT
    Member
    Post count: 11032

    Hi Dapper, it definitely also searches products, see here: http://galerietje.emeticus.nl/?s=bremer

    supreme it’s not really the same problem, but unfortunately your request is only possible to achieve by modifying the theme’s php code.
    Here’s a tutorial http://www.wpbeginner.com/wp-tutorials/how-to-limit-search-results-for-specific-post-types-in-wordpress/

    All the best

    #41525
    DAPPER-tekstenweb
    Member
    Post count: 174

    Melanie,

    You entered (part of) the name of a product. Yes, then it finds that product.

    My question is about the name of the artist being a product category, but when i search for this name, products whit that category are not showing up in the search results.

    Could you please look into this matter using the example I gave you?

    Regards,
    Daphne

    #42084
    Melanie – SUPPORT
    Member
    Post count: 11032

    You can only search for the item name!

    #42111
    DAPPER-tekstenweb
    Member
    Post count: 174

    Aha. Any chance this will change in the future? That the search will index categories too?

    #42636
    Melanie – SUPPORT
    Member
    Post count: 11032

    I will forward this to the developer to consider, cheers!

    #42964
    supreme87
    Member
    Post count: 39

    And there is a simple way instead of use the basic wordpress search, using the woocommerce search?
    because if I go to mydomain.com/?s=XXX&post_type=product i see esaclty what I want to see
    thanks

    #43608
    laranz – SUPPORT
    Member
    Post count: 3186

    Hi,

    Yes you can do like that for product search, http://neighborhood.swiftideas.net/?s=case&post_type=product

    if you want do that automatically, go to \wp-content\themes\neighborhood\includes\swift-framework\sf-content-display\sf-header.php line #567 looks like this.

    $menu_full_output .= '<li><div class="ajax-search-wrap"><div class="ajax-loading"></div><form method="get" class="ajax-search-form" action="'.home_url().'/"><input type="text" placeholder="'.__("Search", "swiftframework").'" name="s" autocomplete="off" /></form><div class="ajax-search-results"></div></div></li>'. "\n";

    change that to

    
    $menu_full_output .= '<li><div class="ajax-search-wrap"><div class="ajax-loading"></div><form method="get" class="ajax-search-form" action="'.home_url().'/"><input type="text" placeholder="'.__("Search", "swiftframework").'" name="s" autocomplete="off" /><input type="hidden" name="post_type" value="product" /></form><div class="ajax-search-results"></div></div></li>'. "\n";

    That will do the trick for the search form in the header.

    Let me know, what you guys got.

    Thanks,
    laranz.

    #43793
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Thanks Laranz, glad to have you back ๐Ÿ™‚

    – Ed

    #43794
    laranz – SUPPORT
    Member
    Post count: 3186

    Thanks for welcoming me, Ed ๐Ÿ˜‰

    -La ๐Ÿ˜›

    #43796
    supreme87
    Member
    Post count: 39

    work perfectly! really thanks!

    #44467
    Melanie – SUPPORT
    Member
    Post count: 11032

    fantasic!!

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register