[Resolved] I use view order by other plugin’s custom field, but it doesn’t work
This thread is resolved. Here is a description of the problem and solution.
Problem:
The issue here is that the user has defined a custom order in his view but it was not working.
Solution:
In this user's case he had the post order plugin installed which was overwriting the order function for views. So I would recommend disabling this plugin.
This support ticket is created 6 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I am trying to: I use view order by other plugin's custom field name : rwp_user_score
Link to a page where the issue can be seen: hidden link
I expected to see: I thought it'll display the score from high to low, but it didn't work like I thought. And this field's plugin's developer tell me field doesn't has problem. So I guess is view's problem. Please help me, it's really an emergency! Thanks.
The confusion seems to be caused by the Plugins CPT as it does not contain the custom field that you are sorting by so its not possible to sort this group.
I would suggest using a custom field that is common between them to sort the view.
Also regarding the custom field that you are trying to sort by i'm not sure how that was added since its not a Types created field so you will need to also add this custom field to the Plugins CPT in the same manor in which it was added to the DAWS CPT .
Please let me know if this points you in the right direction.
I tried using a hook that should've allowed uss to resolve this but it seems there is an issue where the Views plugin is not responding to the Orderby parameter.
I've reported this to our development team but currently this is the only solution which does not work.
//Return only posts from the current author when listing posts of type company:
add_filter( 'wpv_filter_query', 'prefix_show_only_current_author', 99, 3 );
function prefix_show_only_current_author( $query_args, $view_settings, $view_id ) {
if($view_id == 2176 ){
$query_args = array(
'post_type' => 'daw',
'meta_key' => 'wpcf-rwp_user_score',
'orderby' => 'meta_value_num',
'order' => 'ASC',
);
}
return $query_args;
}
Not much i can do until its resolved from our development team