Jump to content

Archived

This topic is now archived and is closed to further replies.

dyl0310

Replacing default search with a different search bar

Recommended Posts

dyl0310    0
dyl0310

hello. im using jigoshop for pagelines. i have a product search widget (also have a shortcode for the widget) i know i can disable the default search bar in the navbar, but was wondering if there's a way to replace it with the product search? any suggestions?

Share this post


Link to post
Share on other sites
Rob    547
Rob

Hi,

My recommendation would be to use the widget in a sidebar, so you can tell visitors they're searching the store only.

 

However, if you'd like, you can use the shortcode in a menu item adding it in the label field via your menu item at Dashboard > Appearance > Menus.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
dyl0310    0
dyl0310

i want to replace where the default searchform is with the jigoshop search. i also dont understand the menu thing... is there a way to just directly replace the default searchbar with the jigoshop searchbar? it's strictly an ecommerce site. i dont need a search for pages and posts only products. i have never like a site with a searchbar anywhere but in the nav.

Share this post


Link to post
Share on other sites
Rob    547
Rob

I'm not sure if a shortcode works in the menu, but a PHP tag, or an i call (as for Font Awesome) will work. You're free to try it.

 

Just go to Dashboard > Appearance > Menus and create a new Custom Link.  In the link field, try placing # (which defaults as nothing) and add your shortcode in the Label field.  That should make the call from the shortcode display the search.  Save it.  If it doesn't work, try it with the shortcode in the link field and skip the #.

 

Save the menu item. Save the menu.  And inspect it. Let us know.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

  • Similar Content

    • reklov79
      By reklov79+
      Hi,
      Meganav seems to have a bug if you upload a Logo with a higher resolution (which actually is useful as it looks then sharper on mobile phones). But on mobile the Logo is then larger than on a desktop. Problem is the following code in the meganav style.css. Simply the "height: auto !important" needs to be removed.
      @media (max-width: 480px) { style.css?ver=5.0.14:133 body .meganav-logo img{ height: auto !important; } } But how to achieve that? What is the standard method for customizing that? Overriding via CSS / LESS doesn't work - in this case especially because of the !important derictive used in the original CSS I believe.
      Changing the original CSS is something I don't want to do as it leads into issues when upgrading.
      Btw: I seem not to be the only one with that issue - anyhow, the solution here (not displaying the Logo on mobile) is not acceptable for me.
      Thanks,
      Volker
       
    • Grant Turck
      By Grant Turck+
      Navbar Broken on All Devices When Not Logged Into Wordpress. See screenshots attached from mobile. What is causing this issue and how do I fix? Site is venicepride [dot] org.


    • flourishdesignstudio
      By flourishdesignstudio
      I am using Jigoshop on a website that also uses PL5 and am running into an issue where the store pages do not allow me to use the PL5 editor. Is anyone else having this problem or know if a solution? 
      When I open the Chrome console I see the following error:
      site.js?ver=b199df:5 Uncaught ReferenceError: PLData is not defined
          at Object.setMasterModel (site.js?ver=b199df:5)
          at Object.init (site.js?ver=b199df:5)
          at HTMLDocument.<anonymous> (site.js?ver=b199df:5)
          at i (jquery.js?ver=1.12.4:2)
          at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
          at Function.ready (jquery.js?ver=1.12.4:2)
          at HTMLDocument.K (jquery.js?ver=1.12.4:2)
       
      The problem can be seen here: http://fingerlakesdistilling.com/shop/ where the sidebar, footer, and header do not show up. Any thoughts?
      Thanks so much!
    • John Olsson
      By John Olsson+
      Hello, i'm working on a webshop, and got this code to really boost the search within WP. But when adding this code to functions.php the front end media library search flipped totally, and not working at all, any ideas what's the problem?
      function atom_search_where($where){ global $wpdb; if (is_search()) $where .= "OR (t.name LIKE '%".get_search_query()."%' AND {$wpdb->posts}.post_status = 'publish')"; return $where; } function atom_search_join($join){ global $wpdb; if (is_search()) $join .= "LEFT JOIN {$wpdb->term_relationships} tr ON {$wpdb->posts}.ID = tr.object_id INNER JOIN {$wpdb->term_taxonomy} tt ON tt.term_taxonomy_id=tr.term_taxonomy_id INNER JOIN {$wpdb->terms} t ON t.term_id = tt.term_id"; return $join; } function atom_search_groupby($groupby){ global $wpdb; // we need to group on post ID $groupby_id = "{$wpdb->posts}.ID"; if(!is_search() || strpos($groupby, $groupby_id) !== false) return $groupby; // groupby was empty, use ours if(!strlen(trim($groupby))) return $groupby_id; // wasn't empty, append ours return $groupby.", ".$groupby_id; } add_filter('posts_where','atom_search_where'); add_filter('posts_join', 'atom_search_join'); add_filter('posts_groupby', 'atom_search_groupby');  
    • Queue-it
      By Queue-it+
      HI,
      Search function doesn't seem to work. 
      When ever searching for something it redirect to the home page and add the search string to the url.
      For example searching for "cases" it would display https://queue-it.com/?s=cases
      Do you know how to solve that? 
×