I solved it myself. I deleted the ACF for that post object. Updated the field group. Added it back and it worked again.
Yes. I pretty much always checked that. Would you like to look at the site?
Ok. I just did both of those and it still doesn’t work. I then applied your new update and it still doesn’t work after that. I also deactivated CPT UI then reactivated it and it still doesn’t work.
My next test was to get the code for the CPT UI post types and taxonomies and put it into functions.php and turn off CPT UI altogether – and it still doesn’t work.
I disabled everything but ACF and CPT UI (Custom Post Type UI) and changed to the Twentyfifteen theme and it still doesn’t work.
I’m having the same problem. Any solutions?
I think we’ll have to implement that. Thanks anyways then!
Kermit Woodall
Yeah, but without the meta key it won’t sort. I’m amazed this is something WordPress overlooked.
Here’s the code from functions.php
add_action( 'pre_get_posts', 'vendor_sort' );
function vendor_sort( WP_Query $wp_query ) {
// Ensure it is the global $wp_query
if ( ! $wp_query->is_main_query() )
return;
if ( $wp_query->is_tax( 'vendor-type' ) ) {
$wp_query->set( 'meta_key', 'crfp-average-rating' );
$wp_query->set( 'orderby', 'meta_value_num' );
$wp_query->set( 'meta_compare', '>' );
$wp_query->set( 'order', 'DESC' );
}
}
BTW…I restored back to the previous WP release (prior to 4.8) and the repeater field is showing fine there. So…4.8 issue?
Kermit Woodall
http://kermitwoodall.com
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.