product images in search results
-
Is there a way of having the product images appear in the search results?
The page I need help with: [log in to see the link]
-
Just checking this one for you now.
We will either have to inject …
<input type="hidden" name="post_type" value="product" />
… into the search form … OR … find a way to show product images on the normal site search … OR … you may be able to add a featured image to your products which might show up on the normal site search.
Take a look at that last option whilst I look into injecting the hidden input field into the header search modal.
Oliver
Hi, thank you.
all products already have a featured image.
I have already got a code in the normal search to hide the shortcode.
It is possible to filter the theme’s search form to do what you want using the “get_search_form” filter. We will add this to our “to do” list and let you know when we have more information for you.
Please explain what you mean by “I have already got a code in the normal search to hide the shortcode”. Please provide the code you are using here so we can see what you mean.
Thank you,
Oliver
Thank you, I am keen to get this live asap, so if you could let me know when this will work , that would be great.
This is the code I was given to hide the shotcode
/*Hide shortcode from search results | 29963991-hc | ERM*/
div.post-inner.thin > div {
display: none;
}We are not scheduled for a plugin update but having said that I’m sure we can have something for you next week.
Oliver
that would be amazing, thank you.
on a sperate note, we use a live chat platform which don’t have a wordpress plug in yet, but have given us code that works on magento but won’t save when I try on here, any ideas why that might be?
We would need to see the code that you are trying to add and how / where you are trying to add it.
However, unfortunately, it cannot be covered by this support forum.
Oliver
This is the code and I totally understand, it’s nothing to do with you.
I was told “would need to be deployed in the <head> of this new site. ”
<!-- BEGIN LivePerson Monitor. --> <script type="text/javascript">window.lpTag=window.lpTag||{},'undefined'==typeof window.lpTag._tagCount?(window.lpTag={wl:lpTag.wl||null,scp:lpTag.scp||null,site:'31026783'||'',section:lpTag.section||'',tagletSection:lpTag.tagletSection||null,autoStart:lpTag.autoStart!==!1,ovr:lpTag.ovr||{},_v:'1.10.0',_tagCount:1,protocol:'https:',events:{bind:function(t,e,i){lpTag.defer(function(){lpTag.events.bind(t,e,i)},0)},trigger:function(t,e,i){lpTag.defer(function(){lpTag.events.trigger(t,e,i)},1)}},defer:function(t,e){0===e?(this._defB=this._defB||[],this._defB.push(t)):1===e?(this._defT=this._defT||[],this._defT.push(t)):(this._defL=this._defL||[],this._defL.push(t))},load:function(t,e,i){var n=this;setTimeout(function(){n._load(t,e,i)},0)},_load:function(t,e,i){var n=t;t||(n=this.protocol+'//'+(this.ovr&&this.ovr.domain?this.ovr.domain:'lptag.liveperson.net')+'/tag/tag.js?site='+this.site);var o=document.createElement('script');o.setAttribute('charset',e?e:'UTF-8'),i&&o.setAttribute('id',i),o.setAttribute('src',n),document.getElementsByTagName('head').item(0).appendChild(o)},init:function(){this._timing=this._timing||{},this._timing.start=(new Date).getTime();var t=this;window.attachEvent?window.attachEvent('onload',function(){t._domReady('domReady')}):(window.addEventListener('DOMContentLoaded',function(){t._domReady('contReady')},!1),window.addEventListener('load',function(){t._domReady('domReady')},!1)),'undefined'===typeof window._lptStop&&this.load()},start:function(){this.autoStart=!0},_domReady:function(t){this.isDom||(this.isDom=!0,this.events.trigger('LPT','DOM_READY',{t:t})),this._timing[t]=(new Date).getTime()},vars:lpTag.vars||[],dbs:lpTag.dbs||[],ctn:lpTag.ctn||[],sdes:lpTag.sdes||[],hooks:lpTag.hooks||[],identities:lpTag.identities||[],ev:lpTag.ev||[]},lpTag.init()):window.lpTag._tagCount+=1;</script> <!-- END LivePerson Monitor. -->
It’s likely that a plugin like this will do what you want ??
Oliver
ok, thanks.
Let me know if you can sort the images in search
one last question. Can the top menu items be centralised?
Try adding this CSS to “Customizer – Additional CSS” …
@media (min-width: 1000px) { .header-inner { justify-content: center; } }
That should do what you require. Please confirm and we will add it as an option in the plugin.
Oliver
sorted, thank you
Looking at it, this only works on your website because for some reason you don’t have a site title.
Anyway, with regards to the product images in the site search, we have pushed a new version of the premium plugin that now has “Customizer – Nav Options – Limit Search to Post Type”.
We have chosen to place this feature in the premium plugin because it isn’t something that we have seen anywhere else.
Unfortunately, due to WordPress forum guidelines, we are not allowed to discuss premium plugins here so we will have to mark this as “resolved” now.
Oliver
- The topic ‘product images in search results’ is closed to new replies.