Forum Replies Created
-
AuthorPosts
-
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou are welcome 🙂
No problem, that is also possible via this changed code:
add_filter("asp_query_args", "asp_query_args_change", 10, 2); function asp_query_args_change($args, $search_id) { if ( $search_id == 1 ) { $include_ids = array(1, 2, 3); // Media file IDS to include // No change below $ids = implode(', ', $include_ids); $args['attachment_query']['where'] = "AND $wpdb->posts.ID IN($ids)"; return $args; } }Just change the number on line with the ID of the search for which this code should be effective:
if ( $search_id == 1 ) {Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterHi,
Thank you very much for the details, it helps me a lot!
The results are very likely matched from either the selected custom fields or via the taxonomy terms as configured here: https://i.imgur.com/FLwTr7O.png
There is probably a custom field or a category name associated with those results which makes it a match. Try removing some custom fields or turning off the taxonomy search to see if that makes a difference, it should resolve the issue.I also tried the search when logged in, but it seems to work okay on my end: https://i.imgur.com/sqx56vp.png
You may only need to clear the browser cache, that should resolve that issue.Ernest Marcinko
KeymasterHi,
Thank you very much for your kind words and for the details it helps me a lot!
I believe the best way to get around this is by using this option to exlude media files by their IDs.
Unfortuntely there is no option to include only specific media files, but it should be still doable via using a small custom code snippet:
add_filter("asp_query_args", "asp_query_args_change", 10, 2); function asp_query_args_change($args, $search_id) { $include_ids = array(1, 2, 3); // Media file IDS to include // No change below $ids = implode(', ', $include_ids); $args['attachment_query']['where'] = "AND $wpdb->posts.ID IN($ids)"; return $args; }In this code you only need to change the $include_ids variable and add the meida file IDs which you want to see in the results list. Try adding this code via the Code Snippets plugin or to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
Ernest Marcinko
KeymasterHi Samuele,
Elementor Loops with default configuration (using current query) may actually work if combined with the Posts/Product widgets or the archive widgets if used on archive pages. A more generic support will be added in the next release.
Other elements may only work if used on Archive pages – where they use the currently active query. Unfortunately there is just too many widgets out there and they change very often, for now we can only keep up with Elementor.
Ernest Marcinko
KeymasterYou cannot access this content.
June 14, 2023 at 9:24 am in reply to: Theme & Styling tab in the options never finishing loading #43062Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
June 13, 2023 at 9:39 pm in reply to: Theme & Styling tab in the options never finishing loading #43057Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterHi,
Sure! The results page live loader might be enabled, but it can’t find the specified node. Can you please try to turn it off here: https://i.imgur.com/ugjTf5P.png
That should very likely do the trick.
Ernest Marcinko
KeymasterHi,
It will look for the post tag which matches, the count of items within the taxonomy is not considered in this case. It only checks the text – as fast as possible – and returns immediately if a match is found.
Yes, the ordering matters in this case. It goes from the top, to the bottom of the source list until it finds a keyword from the given source. In your case it will try the post tags first, if no match, then tries the statistics database.
Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts