Ordering Looper Provider Output

Hello!

I’m building off of this thread, and reconstructing it to allow arbitrary ordering based on an ACF meta key.

This other article shows how to adequately do that, but I’m unclear how to reincorporate targeting the categories (NOT the posts within the categories).

Here’s the string, with the bold/italic text being the part I’m asking about:

the_category=value&orderby=meta_value&meta_key=acf_category_order_control&order=ASC

I’ve watched this asset plenty of times which helped me wrap my head around the initial string, but it isn’t shining any light on the looper’s source targeting:


With any luck, it may turn out that this helps close the first linked thread above, too. :stuck_out_tongue: Thanks in advance!

Hi @Rule72

Thanks for reaching out.
It should be the name of your custom taxonomy and it looks like the following. In the following Query String, the localization is a custom taxonomy.

localizacion={{dc:term:name}}&post_type=actividad&posts_per_page=3&offset=0&ignore_sticky_posts=1&post__not_in%5B0%5D={{dc:post:id}}

Hope it helps.
Thanks

1 Like

My apologies, I realize I wasn’t nearly as concise as I needed to be to get this answered. (I don’t have any custom taxonomies or post types on this build, fortunately for my sanity lol.)

I have an “All Terms” Looper Provider, but I want to be able to order it based on an ACF field. So I need to rebuild it using something else, likely a query string. Can a query string (in context) use {{dc:term:name}} or similar dynamic content in order to output categories (NOT posts)?

And if this is possible… what’s the parameter?
(I know this is the WP function, NOT the parameter lol, just showing so you can see my purpose.)
image


I can target almost anything else all day every day, but when working with categories specifically I’m apparently clueless!

Hi @Rule72,

The All Terms looper returns the categories, tags, or any other taxonomies, whereas the Query String always return the Posts based on the parameters. So, if you want to show the categories or any taxonomy in a specific order, you need to create a custom Looper Provider which will return the taxonomies with the specified order. I would suggest you go through the following thread which will help you on custom Looper Provider and terms orders.


Thanks

Gotcha! That explains so much lol.

Basically, All Terms is wp_list_categories() and Query String is one of the many ways to get posts?

Hey @Rule72,

Yes, you are right! Query String is one of the many ways to get posts with complicated queries.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.