Sakshi Tyagi
Forum Replies Created
-
It’s working now! Thank you so much for all your time and assistance. I truly appreciate it! ??
I found the error in the pointed line of code. Below is the correction:
$args['post_primary_order_metatype'] = 'customfp ' . strtoupper($orderby_settings['order']) === 'ASC' ? 'ASC' : 'DESC';
//Here is the updated code
add_filter('asl_query_args', 'modify_asl_search_sorting', 10, 2);
function modify_asl_search_sorting($args, $search_id) {
$orderby_settings = wpsp_get_orderby_select();
$args['post_primary_order_metatype'] = 'customfp ' . strtoupper($orderby_settings['order']) === 'ASC' ? 'ASC' : 'DESC';
$args['post_primary_order_metatype'] = $orderby_settings['orderby'] === 'meta_value_num' ? 'numeric' : 'string';
$args['_post_primary_order_metakey'] = $orderby_settings['meta_key'];
return $args;
}But still order is not getting changed even though the selected filter is being passed in the search Query:
Executed SQL: SELECT SQL_CALC_FOUND_ROWS wp_posts.*
FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id )
WHERE 1=1 AND (((wp_posts.post_title LIKE '{0d77b9a9bf73277ef7db3f407eae97a0a2944832fb7814f9991298d8c351dc1e}WHITMAN{0d77b9a9bf73277ef7db3f407eae97a0a2944832fb7814f9991298d8c351dc1e}') OR (wp_posts.post_excerpt LIKE '{0d77b9a9bf73277ef7db3f407eae97a0a2944832fb7814f9991298d8c351dc1e}WHITMAN{0d77b9a9bf73277ef7db3f407eae97a0a2944832fb7814f9991298d8c351dc1e}') OR (wp_posts.post_content LIKE '{0d77b9a9bf73277ef7db3f407eae97a0a2944832fb7814f9991298d8c351dc1e}WHITMAN{0d77b9a9bf73277ef7db3f407eae97a0a2944832fb7814f9991298d8c351dc1e}'))) AND (
wp_postmeta.meta_key = 'authorlast'
) AND ((wp_posts.post_type = 'aboutslider' AND (wp_posts.post_status = 'publish'
OR wp_posts.post_status = 'private')) OR (wp_posts.post_type = 'attachment' AND (wp_posts.post_status = 'publish'
OR wp_posts.post_status = 'private')) OR (wp_posts.post_type = 'book' AND (wp_posts.post_status = 'publish'
OR wp_posts.post_status = 'private')) OR (wp_posts.post_type = 'catalogues' AND (wp_posts.post_status = 'publish'
OR wp_posts.post_status = 'private')) OR (wp_posts.post_type = 'page' AND (wp_posts.post_status = 'publish'
OR wp_posts.post_status = 'private')) OR (wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish'
OR wp_posts.post_status = 'private')) OR (wp_posts.post_type = 'slider' AND (wp_posts.post_status = 'publish'
OR wp_posts.post_status = 'private')))
GROUP BY wp_posts.ID
ORDER BY wp_postmeta.meta_value ASC
LIMIT 0, 10‘authorlast’ is the meta_key which I selected through sorting dropdown.
Please guide!
Thanks for your response!
I tried your code but now I don’t see any results on my search results page after adding this code. I think its most probably due to this line of code
$args['post_primary_order'] = 'customfp ' . strtoupper($orderby_settings['order']) === 'ASC' ? 'ASC' : 'DESC';When I commented above line, results showed, irrespective of the selected order filter. So, can you please confirm if its used correctly in the filter.
Thankyou for your respone!
Well, I’m aware of this ordering feature in the plugin settings. However, on the my website’s search result page I have a Sort dropdown thorough which I need to dynamically pass the meta key and meta value to the search query.
Here is my search sorting dropdown https://prnt.sc/OcYBXdy76RAG
I have updated my code to below:
add_filter('asl_query_args', 'modify_asl_search_sorting', 10, 2);
function modify_asl_search_sorting($args, $search_id) {
$orderby_settings = wpsp_get_orderby_select();
$args['meta_key'] = $orderby_settings['meta_key'];
$args['orderby'] = $orderby_settings['orderby'];
$args['order'] = $orderby_settings['order'];
return $args;
}wpsp_get_orderby_select() method gives me selected sorting data. For example this type of data:
Array ( [1] => [2] => [3] => [4] => [5] => selected="selected" [6] => [meta_key] => year [orderby] => meta_value_num [order] => ASC )
But the sorting is still not effective.
Please help.
Hi,
Can you please navigate to the WordPress Admin Dashboard > Forminator > Integrations > Applications > Check if three Google Spreadsheet integrations have been added. If yes, you can remove the ones that aren’t in use
This I checked and found same APP connection details were duplicated two more times. So I delete them.
Manually will take time to re-connect all the forms. Is there no way we can retrieve those connections back?
Hi,
Thanks for the update!
Earlier, I could see only one Google Sheet connection option, but now it appears three times. Please take a look at this screenshot: https://prnt.sc/hUXzCtwLWSCa.
Additionally, the existing Google Sheet connections in our forms seem to have been disconnected. Is there a way to restore these connections? We have around 50 forms in Forminator, and reconnecting each one manually would be extremely time-consuming.
Please let me know if there’s a solution to retrieve the connection data.
Thanks for your help!
Okay I notice that the domain is different for all these UTM parameters some are from staging and some from production.
Thanks
Hello,
I’m using the paid version of TranslatePress and have submitted my issue through your ticketing system. As I can’t share site details here, I’ll wait for your response on the portal, where I can provide additional information.
Thank you!
Hi,
Google page insights still shows the same error “Avoid serving legacy JavaScript to modern browsers” for wp-content/plugins/forminator/assets/js/library/intlTelInput.min.js
Looking forward for a fix of this issue.
Hi @wpmudevsupport3,
Thankyou for the update.
I checked that but its time taking and double effort if number of ads are more.
Forum: Plugins
In reply to: [Ajax Search Lite - Live Search & Filter] Vulnerable ASP Cache FileThanks for your quick response!
I uploaded file to we transfer. Please download it from here https://we.tl/t-TrtiSK74dx
Forum: Plugins
In reply to: [Custom Post Type UI] Taxonomy and custom post-type with same rewrite-slugHi Michael,
Thanks for your suggestion. It worked for me.
Forum: Plugins
In reply to: [Passwordless Login] Token expires for some usersHi @alexandrubodea,
Thanks for digging into it.
In such case user will never be able to login in their account. Can we allow this link to expire after 2 clicks?
Forum: Plugins
In reply to: [Passwordless Login] Token expires for some usersYes, using latest plugin version 1.1.2