stoelwinder
Forum Replies Created
-
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Website Shows Results but Admin doesntThank you for the suggestion! That looks a bit complicated for my skillset, but I’ll try to mess around with it.
- This reply was modified 2 years, 1 month ago by stoelwinder.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Website Shows Results but Admin doesntI actually did, but realise what I did wrong:
I put it as:
remove_filter( 'relevanssi_indexing_restriction', 'relevanssi_woocommerce_restriction' );
instead of
add_action( 'init', function() { remove_filter( 'relevanssi_indexing_restriction', 'relevanssi_woocommerce_restriction' ); }, 999 );
Which still stopped it from working.
So, now with the following:
add_action( 'init', function() { remove_filter( 'relevanssi_indexing_restriction', 'relevanssi_woocommerce_restriction' ); }, 999 );
– (didnt have to include the portion of excluding hidden from public searches)
– Yoast Exclusion enabled
– And a rebuild of unindexed postsIt is now working as intended!
Thank you so much for sticking with me!
One last minor question:
Is it possible to sort results by putting “out of stock” items at the bottom of the search results, unless it is an exact match?Forum: Plugins
In reply to: [Relevanssi - A Better Search] Website Shows Results but Admin doesntAfter disabling the option under Indexing > Advanced for Use Yoast SEO noindex., I still get the same error under Debugging “WooCommerce Yoast SEO Relevanssi index exclude”. However, when I remove the hidden tag, it shows the data from the post successfully.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Website Shows Results but Admin doesntWhen I hide the result and go to debugging using the post ID, it says:
<strong>Possible reasons this post is not indexed</strong> WooCommerce Yoast SEO Relevanssi index exclude
However, when I go to the product in question and scroll down to Yoast SEO settings, it shows:
Allow search engines to show this Product in search results?: Yes
Is there something else I’m doing wrong?
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Website Shows Results but Admin doesntSorry for the confusion. What I meant was for Woocommerce products, for visibility I change it from “Catalog & Search” to “Hidden” if I don’t want them to show up in public search results, but still want to be able to edit them. This often happens when a product is prelaunch or when it is semi-permanently out of stock but may still experience small batches of restocks irregularly.
I did not try the debugger. How can I do that?
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Website Shows Results but Admin doesntYes I actually did
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Website Shows Results but Admin doesntBased on what I can see, it has to do with the remove_filter. When I dont add the second part of the code and I search for the Hidden product, it still doesnt show up in both public and private search.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Website Shows Results but Admin doesntI just added both pieces of code to my functions.php but that didnt do the trick.
Situation:
Product A: Catalog & Search
Public Search: Shown
Private Search: ShownProduct B: Hidden
Public Search: Not Shown
Private Search: Not ShownThis is applicable both before and after I enabled the code above in functions.php. Is there a typo somewhere?
Thank you, that solved it!
Ok thank you, I’ll try to locate the files that did not get optimized and try to force optimize those that are “stuck”.
As for backups, I no longer have the original files (I have cleared the backups). Can I still force an optimization for all images?
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Website Shows Results but Admin doesntThanks for the alternative suggestion. Unfortunately the Admin Search option under Dashboard is not very useable because whatever products it finds, when you click on the link, instead of bringing up the Edit page (to allow me to make product changes), it opens the external page (which I can already get by searching the external site).
But…….
Eureka! Managed to get it to work by searching the forum here:
I added
add_filter( 'relevanssi_search_ok', 'rlv_product_search_override', 10, 2 ); function rlv_product_search_override( $ok, $query ) { if ( isset( $query->query_vars['product_search'] ) ) $ok = true; return $ok; }
and
add_filter( 'relevanssi_modify_wp_query', 'rlv_product_search_modify' ); function rlv_product_search_modify( $query ) { if ( isset( $query->query_vars['product_search'] ) ) { $s = $_GET['s']; $query->set( 's', $s ); } return $query; }
And it now uses Relevanssi for searching in admin. Which caused 1 odd (but understandable) issue:
When I search products and the product is hidden from the Catalog & Search (for external users), the products now also dont show up for administrators, which can be problematic (some products may need to be hidden while waiting for launch or products may be temporarily unavailable and later have to be made available again without allowing external users to see them).
Is there some way to adjust the code above to include “hidden” products as well?
- This reply was modified 2 years, 1 month ago by stoelwinder.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Website Shows Results but Admin doesntHere I thought I was soooo stupid because Relevanssi Options > Searching > Admin Search was unchecked, but after checking the box and saving, there’s still no results when I search for MPN *Pfew!
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Website Shows Results but Admin doesntI’m happy to inform you that I’ve managed to fix the AJAX Live Search now showing results when searching for MPN and results are consistent with the search results shown when pressing enter.
Turns out I should’ve searched the Knowledge Base for “Flatsome” as it gave me the bullet I needed to fix it. I didnt need the big Flatsome portion of code, but I could use the code under “If the live search does not work” and it showed up perfectly.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Website Shows Results but Admin doesntThanks for the prompt response! I have Relevanssi Search Options > Indexing > Custom fields set to All so it should be indexing custom fields. I know its not optimal, but wanted to get it working first and then can optimise it later (which of course I never got to ;D).
Again, the results do show up when I search for MPN on the website, which seems to indicate that Relevanssi is working as intended, but the admin interface doesnt show any results when searching for the same MPN.
I use an smtp plugin as well, but dont seem to have any issues. I’m using WP Mail SMTP. You could also try and add the IP address of the server you’re mailing from into the whitelist at Advanced Firewall Options.