Short code for documents of particular language

I’d like to create a page where all documents of a particular language (in this case, English) are displayed. Does such a plug-in or shortcode already exist? If not, would the best way to do this be a simple page and then creating a short code via a plug-in for it?

I don’t think that shortcodes support that kind of search (I’m assuming the language is determined based on the Dublin Core Language element?).

But, there’s a possible sneaky way to do it another way with the Search By Metadata plugin.

That plugin lets you set any field to link to a search for that value, so you could make any language metadata value of “English” link to a list of items with that value.

Once you have that, follow the link and it will give you a very long URL with all of that search data. Then, create a new navigation link in the Appearance settings, and use that URL. That’ll make a navigation link that goes to that list. You could then deactivate Search By Metadata.

A similar process could get you well on the way to creating a plugin for that shortcode if needed, but I suspect the approach above would be more direct.

1 Like

Hey Amanda,
If you indicate the language in the metadata field, then you can just lift the advanced search string to drop in the navigation as a browse page. Does that make sense? This cuts out the Search by Metadata stage.

1 Like

D’oh of course… That worked! The latter was easy enough, so that’s what I chose. Thanks to both of you!

Thanks Sharon…I was adding a layer of complication to get to the same place. Glad it worked, Amanda!