Skip Navigation

[Resolved] Sort on relationship posts

This support ticket is created 2 years, 1 month 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.

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

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 9 replies, has 2 voices.

Last updated by garenM 2 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#2502617

Hey there is a way to sort the connected posts for each single post?

#2502983

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As I understand - you want to sort the posts displayed with the edit post screen of single post under the post relationship box - is that correct? if yes:

With the header of post relationship box table there is a sorting feature using which you can sort the posts. Please check the following screenshot:
- hidden link

Please let me know if I misunderstood your requirement. If so, please share bit more details about your issue and few screenshots that will help me to understand your issue first.

#2503009

yes that correct, i need to sort that section for each post on the view results. is there a way to use drag & drop option or something else?

#2503021

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

No - there is no such drag-drop option. Do you want to display the posts in some custom order on frontend?

#2503035

yes I need lets say on "Course Post 1" to show the "Academic 1" first but on the "Course Post 2" I want to show him last. Is that possible? Can you advise me how can we do it?

#2503041

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Maybe you should create a repeating field group that repeating field group should have fields:
- Sort post ID (the ID of the post which you want to sort)
- repeating field group allow you to sort the positions

And then consider the repeating field group field "Sort post ID" value to display the post and repeating field group sort order.

Will that help?

#2503081
views ordering.png
fields.png

Hey i create that repeatable field (see screenshot) and I have change the ordering on the view (see screenshot) but returns me no items found. Can you advise?

#2503129

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please share the problem URL and admin access details and tell me on what post you want to display the post at first and on what post you want to display the same post at last.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2503177

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please check your view that displays the repeating field gorup:
- hidden link

I've changed the ordering section value to "toolset-pot-sortorder" and within the view's loop editor section with all the shortcode I've added the item attribute, for example: [wpv-post-url item="[types field='academic-id'][/types]"]

<div class="staff-box">
  <a href="[wpv-post-url item="[types field='academic-id'][/types]"]">
    [wpv-post-featured-image class="img-responsive" item="[types field='academic-id'][/types]"]
    <p>READ MORE  <i class="fas fa-angle-right"></i></p>
  </a>
  <h4>[wpv-post-link item="[types field='academic-id'][/types]"]</h4>
  <p class="staff-position">[types field='academic-job' output='raw' item="[types field='academic-id'][/types]"][/types]</p>
  <hr/>
  <p class="staff-info"><ion-icon name="mail"></ion-icon> [types field='academic-email' output='raw' item="[types field='academic-id'][/types]"][/types]</p>
  <p class="staff-info"><ion-icon name="call"></ion-icon> [types field='academic-telephone' output='raw' item="[types field='academic-id'][/types]"][/types]</p>
</div>

Can you please confirm it works as expected now. Glad to help.

#2503183

so the field "Toolset post sortorder" its for the repeatable fields ordeing, cool! My issue is resolved now. Thank you so much!