Closed gsocha closed 6 years ago
You can't sort a relationship field using Pods Templates. If this is a requirement for you, then you shouldn't use Pods Templates. If you were accessing the field via the Pods
class, this would be doable with the find()
method.
Thanks. Where should I go to learn more about this?
George J. Socha, Jr., Esq. Socha Consulting LLC
1374 Lincoln Avenue, St. Paul, MN 55105 office: +1 651 690 1739 | mobile: +1 651 336 3940 | fax: +1 651 846 5920 george@sochaconsulting.com Socha Consulting: www.sochaconsulting.com EDRM: www.edrm.net Apersee: www.apersee.com Mailing list: subscribe for news, requests & more
On Apr 27, 2015, at 11:42 AM, Josh Pollock notifications@github.com wrote:
You can't sort a relationship field using Pods Templates. If this is a requirement for you, then you shouldn't use Pods Templates. If you were accessing the field via the Pods class, this would be doable with the find() method.
— Reply to this email directly or view it on GitHub.
Howdy George, you're going to have to get into PHP WordPress Theme Templates if you want ONE template to show all the different items and be sorted in a specific way. You can check out our documentation on the find() function (which includes our Video PodsCast on using the Find function which includes orderby:
http://pods.io/docs/code/find/
If you're not as familiar with WordPress Theme Templates, check out the latter two PodsCasts which describe how to get your Pods Data into the theme using PHP function calls (WordPress functions in the first one and Pods functions in the 2nd):
http://pods.io/2015/04/03/podscast-003-displaying-data-in-pods-pt-1/ http://pods.io/2015/04/16/podscast-004-displaying-data-pt2/
Thanks, Jim. I have looked at some of the podcasts but I will go back and watch these more carefully.
For what it is worth, it seems to me that one ought to be able to sort a relationship field using a pod template - and a pity that one can’t. Maybe that can go a future features list?
George J. Socha, Jr., Esq. Socha Consulting LLC
Informing digital discovery decisions
1374 Lincoln Avenue, St. Paul, MN 55105 office: +1 651 690 1739 | mobile: +1 651 336 3940 | fax: +1 651 846 5920 george@sochaconsulting.com mailto:george@sochaconsulting.com | http://www.sochaconsulting.com http://www.sochaconsulting.com/
EDRM: http://www.edrm.net http://www.edrm.net/ | subscribe for news http://www.edrm.net/wp-login.php?action=register | unsubscribe mailto:mail@edrm.com?subject=Pleasee%20Unsubscribe%20Me%20From%20EDRM Apersee: http://www.apersee.com http://www.apersee.com/ | subscribe for news, requests & more https://www.apersee.com/pages/subscribe | unsubscribe http://apersee.cmail2.com/t/j-u-zuykry-hihujhkk-y/
On Apr 27, 2015, at 12:22 PM, Jim True notifications@github.com wrote:
Howdy George, you're going to have to get into PHP WordPress Theme Templates if you want ONE template to show all the different items and be sorted in a specific way. You can check out our documentation on the find() function (which includes our Video PodsCast on using the Find function which includes orderby:
http://pods.io/docs/code/find/ http://pods.io/docs/code/find/ If you're not as familiar with WordPress Theme Templates, check out the latter two PodsCasts which describe how to get your Pods Data into the theme using PHP function calls (WordPress functions in the first one and Pods functions in the 2nd):
http://pods.io/2015/04/03/podscast-003-displaying-data-in-pods-pt-1/ http://pods.io/2015/04/03/podscast-003-displaying-data-in-pods-pt-1/ http://pods.io/2015/04/16/podscast-004-displaying-data-pt2/ http://pods.io/2015/04/16/podscast-004-displaying-data-pt2/ — Reply to this email directly or view it on GitHub https://github.com/pods-framework/pods/issues/2868#issuecomment-96786921.
I am using a Pod Template to show data from multiple Pods. The main Pod contains information about organizations. One of the related Pods contains information about press releases. I want to set up the Pod Template so that for each organization, all related press releases are displayed, from newest to oldest. I have been able to set up the Pod Template to show the related press releases. I have not been able to figure out how to show them from newest to oldest. I have not been able to find any guidance in the support forum.
How might I do that, using the Pod Template? Thanks.
I am using Pods version 2.5.1.2 and WordPress 4.2
Here is the page showing what happens with the template: http://www.edrm.net/archives/organization/content-analyst-company
Here is the current template:
[if related_release]
Press Releases
[/if]