[Resolved] Sort order of Pods

Home Forums Support [Resolved] Sort order of Pods

Home Forums Support Sort order of Pods

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #371520
    Harvey

    I’m using GPPro/Pods/BB/BT for a site. Pods serves for CPTs. One Pod is for reference books related to the subject of the site. I can’t figure out how to get the reference books in alpha order by book (Pod) title.

    Jim True over at Pods suggests doing something via a GP Hook in GP Premium. He put these words in my mouth: “I’d like to override the sort in the WP Query for the archive depending on post type.” Is this possible using one of the GP Hooks in Generate Press Premium?

    I’ve just discovered WP Show Posts and now I’m wondering if this is a problem I could solve with WPSP.

    Harvey

    #371709
    Tom
    Lead Developer
    Lead Developer

    You would have to use the pre_get_posts filter most likely: https://wordpress.stackexchange.com/a/180609/90661

    GP Hooks is for elements you can see – functions like this would have to be added using one of these methods: https://docs.generatepress.com/article/adding-php/

    #372205
    Harvey

    Well, drat! Got it. I’ve got a couple of dozen CPTs to construct and each one needs to be sorted in some human-sensible fashion. Sorting posts, pages and CPTs in something other than descending date order is an obvious need in a general-pourpose CMS. Expecting non-programmers to do what this calls for (and debug it) seems like proof that WP still has a ways to go.

    Reminds me of a visit of Peter Norton to a Houston PC club meeting. We were several thousand who had to come to hear one of the great names in PC software back in the 90s. He looked out over the crowd and said, “You’re evidence that the personal computer is not yet ready for prime time. There are no microwave user groups or washing machine user groups.”

    Harvey

    #372358
    Tom
    Lead Developer
    Lead Developer

    Yea, an option for sorting like this should definitely be in WP core.

    Glad I was able to help though 🙂

    #372777
    Harvey

    Just stumbled on a plugin that seems to offer what’s neede without fiddling with a WP filter each time I add a CPT. Apparently Admin Columns Pro provides the ability to sort output from Pods based on Post Title. If you get a chance (not urgent), take a look and leave a comment.

    #373448
    Harvey

    Final post on this subject: Also discovered the plugin Post Types Order at wordpress.org that is supposed to sort CPTs.

    However, I’m going to experiment with the Posts modules of BvrBldr, UABB and PowerPack to see if the custom query with its sort parameter is sufficient.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.