Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/jonschr/simple-query-shortcodes/archive/refs/heads/master.zipUpdates itself. It ships its own updater (Plugin Update Checker), so new versions appear under Dashboard → Updates.
Simple Query Shortcodes
This loop plugin has one piece of functionality I've found to be missing in most of the commercial plugins that do similar things: it allows for custom layouts to be registered by themes or plugins, then assigned to a loop pulling in a particular subset of posts.
Table of contents
Registering a layout
Sample shortcodes
Blog posts
Pull in a specific post
Custom post types
Custom taxonomies
View all parameters
Registering a layout
And here's the killer functionality. You can attach these loops to a layout you register in a theme or plugin. Then use it like so:
This set of instructions are for theme and plugin authors. If you'd like to add a layout, this is the code to copy and paste. There are two functions in here – the first for adding things before the loop starts (scripts and styles, usually), and the second for setting up the markup within each post in the loop.
(The first one is commented out because for simple use cases it won't be needed). Usually I add all of the styles in the theme or plugin that's registering the layout to avoid loading unnecessary files.
Please note: correct usage would be to register the script elsewhere and to