WP SITES

2948 Tutorials & 189 Plugins

Displaying Posts Based On Qeuries & Arguments

You don’t need to understand how to use advanced PHP like qeuries & arguments in order to display posts based on queries & arguments.

If you want to display any number of posts anywhere in your Genesis child theme, you can, simply by installing a plugin.

Bill Erickson has developed a the display posts shortcode plugin which enables you to customize which posts are display based on a number of factors.

Add the shortcode in a post or page, and use the arguments to query based on tag, category, post type, and many other possibilities (see the Arguments). I’ve also added some extra options to display something more than just the title: include_date, include_excerpt, and image_size. Read more

Display Posts Code Snippets & Shortcodes

Here’s some code snippets you can add to your child themes functions.php file

Adding Display Post Shortcodes to Custom Functions

You can also add the display posts custom function and hook it into any of the Genesis hook locations as well as add a conditional tag.

Rather than use a custom loop, you might find this plugin easier to use as it doesn’t require you to have advanced knowledge of PHP code.

This plugin enables you to easily add a shortcode to a custom homepage or custom page template and display posts based on your own needs.

Was This Tutorial Helpful?