Forums › Forums › Search & Filter Pro › Want search to include all attachments Except Images
Tagged: attachments, images, results
- This topic has 27 replies, 2 voices, and was last updated 7 years, 8 months ago by Trevor.
-
Trevor(Private) February 14, 2017 at 9:36 pm #90174
When you deactivate the old site, our server takes a while before you can add the new one. The manual method is as shown in this post:
https://support.searchandfilter.com/forums/topic/deactivate-license-bug/#post-88559
If you want, delete that Post meta condition I added to that search, if it did not work. It is late here, but I will get back on this first thing tomorrow.
Where I had put
not like
.jpg
might need that to be*.jpg*
Anonymous(Private) February 14, 2017 at 10:05 pm #90181Okay thanks, I’ll take it off for now.
Also, I’m not sure if this helps, but if you want to test out if it works on the “Site Wide Searcher” search form it may be easier. To test it, you can just type in “nextec” in the search bar on the Research and Learn page (http://www.nextecgroup.com/research-and-learn/) and the first box on the top row right now is an image. I guess if you do what you do, and that image (or any other images) don’t show up, then it works! If there’s anything else I can supply to help make testing or trial and error work, let me know. Our client is getting super frustrated with this process.
I tried the manual method for updating the plugin. It is still not letting me add the new url to my license in my account, but I’m not sure if that is an issue. Also, now, whenever I click a category on the Blog page or Research and learn page, it says Page not found (when there are posts/pages with that category) so I’m not sure what got messed up but those forms are now not working.
Trevor(Private) February 15, 2017 at 12:06 pm #90280I am logged in now and looking. My guess is that the site wide search was broken. It had two incomplete conditions on the Post Meta settings tab. For any other searches that have no results, check the Post Meta settings tab also?
So, looking at the Site Wide Search. I have edited the template
searchSite.php
and changed one line to this:else if(( get_post_type($post->ID) == 'attachment' ) && ( get_class_for_attachment($my_attachment->ID) != 'Image' )){ ?>
The next line in the template file is now commented out with
//
but is the original line. Your theme has a function to detect if the attachment is an image, so I used that!Anonymous(Private) February 15, 2017 at 6:51 pm #90429Awesome! I think it’s working! I’ve copied that same line to the other templates and it seems to be working. The commented out part wasn’t completed, so it was showing up still but I commented it all out with <!– –>. Thank You!
One more question… do you know why after you click on some categories and hit the Search button, it briefly flashes an image or a page? It seems pretty random for what comes up each time, but we’d prefer it to not do this!
Anonymous(Private) February 15, 2017 at 7:55 pm #90451I spoke too soon 🙁 ! This solution worked for all of the forms with categories to select (blog page and research and learn page), but for any of the search bars (on blog page, research and learn, and also a flyout from magnifying glass in nav), they’re still showing images in the results.
I’m super stumped! I believe these are using the same results pages, so I don’t know why it would show a different result!
Trevor(Private) February 16, 2017 at 3:43 pm #90680The flashing image, I saw that, I am not sure what it is. It seems as though it is the first image in the grid.
You need to check if they are using the same template(s) for the results. Edit the template and add a class somewhere so you can see if it is in the source code (e.g.
class="katie"
). If it is not there, then you need to find the template being used.Trevor(Private) March 27, 2017 at 11:04 am #99624Hi, the image I saw was a loader icon/image. If I do a search for Nextec on the Research and learn page, I see this image:
NexTec-group-photo-2.jpg
If I do a search in the page code for that, I see this:
<link rel="shortcut icon" href="http://nextec.wpengine.netdna-cdn.com/wp-content/uploads/2016/09/NexTec-group-photo-2.jpg" />
.nectar-slider-loading .loading-icon, .portfolio-loading, #ajax-loading-screen .loading-icon, .loading-icon, .pp_loaderIcon { background-image:url("http://nextec.wpengine.netdna-cdn.com/wp-content/uploads/2016/09/NexTec-group-photo-2.jpg"); }
In the page HTML, it looks like this:
<div id="ajax-loading-screen" data-disable-fade-on-click="0" data-effect="standard" data-method="standard"> <span class="loading-icon none"></span> </div>
So, you might take a look at your custom CSS as the CSS making this is added inline (on the page), or you could hide the above container all the time with more custom css, or you might change the image?
I am not sure if that answers the question.
-
AuthorPosts