Skip Navigation

[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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 15 replies, has 2 voices.

Last updated by ning-chungC 6 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#599263

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.

Instead, I got:

#599424

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ning,

Thank you for contacting our support forum.

Would you mind providing me with admin access to the website so that I can check on this for you ?

The private fields will be enabled for you next response.

Thanks
Shane

#599956

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ning,

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.

Thanks,
Shane

#599973

Is CPT custom post type? Why CPT doesn't contain the custom field that I use? Is the field's problem?

#600011

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ning,

Yes Plugins is a CPT that was created hidden link

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.

Thanks,
Shane

#600070
Screen Shot 2017-12-19 at 10.37.30 AM.png

I add oin the post group (rwp_user_score), but still doesn't work.

#600275

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ning,

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

Thanks,
Shane

#600384

So still can't order untill development team resolved? How long will be improved? Cause my website gonna publish these days.

#600456

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ning,

I took another look at this and it seems the issue is being caused by the Post Order plugin.

When disabled the issue is now resolved.

Thanks,
Shane

#600546

Yes,I see. But I don't know why still have 2 posts have not been ordered.

#600567

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ning,

Could you let me know which 2 posts are those ?

Thanks.
Shane

#600568

Massive: hidden link
Reaktor: hidden link

#600580

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ning,

The order is fine, I even created a test view to check this and it is ordering correctly.
hidden link

Thanks,
Shane

#600587
Screen Shot 2017-12-21 at 12.02.38 AM.png

Okay, thank you this problem is resolved, but after I installed view my website has this error.

#600629

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ning,

Since this issue is resolved.

I would recommend marking this one as resolved and opening a new ticket for this new issue.

Thanks,
Shane

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.