Custom post type and custom field as filter
-
Hi, just a pre-sale doubt. Can you please confirm that with pro-version I can add alphabetic pagination to single custom post type item and that I can choose custom field from ACF as meta_key for filtering? Thanks.
-
Hi,
Yes, this plugin will work in your situation. Have a look here
https://ps.w.org/alphabetic-pagination/assets/screenshot-9.png
In case, you need support so i will be available and will modify the script accordingly.
Thanks,
FahadHi, thanks for your reply. Is it possible to choose different filter in different pages? F.i. in a custom post type filter by a custom field and in another custom post type filter by post title?
Thanks
Yes, its possible with a few modifications.
Hi Fahad,
We are using alphabetic-pagination plugin in our woo-commerce catalog page.
but when we click on any alphabetic pagination link then woo commerce sort functionality not working, it is overridden by alphabetic-pagination plugin’s sorting code.However, if we remove the below sort filter code from alphabetic-pagination plugin’s inc/function.php file
add_filter(‘posts_orderby’, ‘ap_search_orderby’, 999);
on line number 852
Then woo-commerce sorting works.Can you update the plugin code and provide an option to manage plugin’s default sorting from admin panel. so that user can enable or disable plugin default sorting from admin side as per his need.
Or Please let us know if any filter available to override alphabetic-pagination plugin’s sorting code.-
This reply was modified 9 years, 2 months ago by
mangesh.kode87.
I will surely check it and update you.
Hi Fahad,
Have you check it.
Please let us know once you are done with it.
As we are planning to make the site live this week.So we want to resolve the issue before that.Thanks
I will check it for soon, hopefully before weekend it will be fixed.
New version has been released, please check and let me know if it works?
Hi Fahad,
Thanks for looking after the issue.
I have checked the issue, it is partially fixed for the case of a woo-commerce dropdown filter when there is “order” parameter added in the query string.
However, when we first time clicks on any alphabetic pagination link then woo-commerce default sort code not work, by default it is overridden by alphabetic-pagination plugin’s sorting code.
We have noticed that there is checked for ‘orderby’ parameter on plugin’s inc/function.php file
if(
—code–
—code–
isset($_GET[‘orderby’])
)
on line number 857
If We we remove this check then it will automatically call Woocommerce default sort.Could you please check so that by default woo commerce sort should work.
Thanks
Hi Mangesh,
I have just updated that file again with an updated condition
(!empty($_GET) && (isset($_GET['orderby']) || isset($_GET['order'])))hopefully it will work, you may download the zip again. Try and give me your feedback if you feel it’s working.
Hi Fahad,
It’s not working.
Still it using alphabetic-pagination plugin’s sorting code on click of alphabetic pagination link.
It should use Woocommerce sort code.Also there is no any parameter with named ‘order’ is used in woocommerce product sorting query string, so below code will not work
(!empty($_GET) && (isset($_GET['orderby']) ||<strong> isset($_GET['order'])</strong>))Thanks
-
This reply was modified 9 years, 2 months ago by
mangesh.kode87.
So you want to disable the order filter through alphabetic pagination whenever you are on WooCommerce pages. At the moment, it’s condition with order and orderby. Am i right?
Yes on Woocomerce Pages, specially on product catalog page its should use woo-commerce sort.
-
This reply was modified 9 years, 2 months ago by
mangesh.kode87.
i understand
I have just updated that function with a condition again, please try and give your feedback if it’s working for you?
-
This reply was modified 9 years, 2 months ago by
The topic ‘Custom post type and custom field as filter’ is closed to new replies.