Wrong order and no cache to set
-
Hi.
I encounter aproblem when ordering related post (drag n’ drop).When changing the order in backend of a post editing, the order is not repport on front.
And i didn’t find any cache option as you describe.To get it works, i have to modify your function like describe in an other issue
global $bawmrp_options; $ids = get_post_meta( $post_id, '_yyarpp', true ); $orig_order=wp_parse_id_list($ids); if( $only_published ){ //$published_ids = !empty( $ids ) != '' ? implode( ',', wp_parse_id_list( wp_list_pluck( get_posts( array( 'include' => $ids, 'post_type' => $bawmrp_options['post_types'] ) ), 'ID' ) ) ) : array(); $published_ids = !empty( $ids ) != '' ? wp_parse_id_list( wp_list_pluck( get_posts( array( 'include' => $ids, 'post_type' => $bawmrp_options['post_types'] ) ), 'ID' ) ) : array(); $ids = array(); foreach ($orig_order as $id){ if (in_array($id,$published_ids)) array_push($ids,$id); } $ids = implode( ',',$ids); }else{ $ids = !empty( $ids ) != '' ? implode( ',', wp_parse_id_list( $ids ) ) : array(); } return $ids;
How to get it work without modifying your code ?
thanka
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Wrong order and no cache to set’ is closed to new replies.