How to use <url query=x /> in loop

Here’s my best guess, although I’ve tried others. What am I missing?

Cheers, Richard

Page URL is: example.com?x=retreiver

<Loop type=dogs field=name field_value="{<Url query=x />}">

Hi Richard,
Have you tried the following?

<Loop type=dogs include="{Url query=x}">

When using tags nested in other tags, the angle brackets are replaced with curly brackets rather than wrapped with curly brackets. We’re working on a proper styleguide to lay all this out in one place for easier reference!

The include parameter accepts both slugs and IDs, so you can pass the url query to it instead of trying to do a custom_field comparison on your loop. Hope that helps!

Edit: there’s also a search parameter you use instead of include if you want the match to be a bit more flexible:

Search by given keyword - Prepending a keyword with a hyphen “-” will exclude posts matching it

I’ve used this to create search archive Loops like so:

<Loop search="{Url query=s}" orderby=relevance order=desc>