Add WooCommerce product search to Genesis navigation

Reader Interactions

Comments

  1. Jacob says

    Wow, Thanks for this.
    oddly, this does not need the Premium WooCommerce Product Search Plugin to work?

    • Frank Schrijvers says

      Hi Jacob,

      No need for an extra plugin. It uses the default product search from WooCommerce.

  2. Marieke says

    Hi Frank!

    Super dit! Ik wilde alleen even checken of dit ook werkt voor mij. Op mijn webshop heb ik al een search-gedeelte in het menu (van mijn childtheme) maar als ik daarin zoek, geeft hij de resultaten weer als een soort blogs, terwijl ik liever een productpagina heb (zoals een categorie) als je snapt wat ik bedoel.

    Is dat te fixen met jouw code of niet?

    • Frank Schrijvers says

      Hi Marieke,

      Ja dat is hiermee te fixen. De zoekresultaten worden weergegeven als producten.Je kan het ‘resultaat’ bekijken door even de WooCommerce Product Search widget te activeren. Of bekijk deze URL voor een voorbeeld: http://whatawonderfulwedding.nl/?s=xl&post_type=product Let er wel op dat dit alleen zoekt in de producten en niet in de rest van je site.

  3. Erik Molenaar says

    Hi Frank,

    Awesome code snippet. However, my main Shop Page has been set to a Page which has been customized. It does not show any Products.

    This search snippet redirects to the main Shop Page. Any way to fix this so it redirects to a specific search results page?

    Thanks again and keep up the good work,

    All the best
    Erik

    • Frank Schrijvers says

      Hoi Erik,

      The search results are displayed on the archive-product.php template, this template is normally also used for the shop page, the category and tag pages. If you need a custom shop page I guess it’s better to create a new page template and leave the archive-product.php as it is.

      Groeten, Frank

  4. Teddy says

    I follow this tutorial, I get only $Total and #Items in numeric, I see your sample above has an “icon” wrapping the “#Items” (“0” product as above)… How do you add the icon?

    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *