[display-posts] shortcode?

I’ve seen some references on the forum to a [display-posts] shortcode. However, when I try to put it in a page I’m creating, nothing show up.

Please note, I am NOT interested in [recent_posts].

I’m creating a News page which will be a listing of ALL posts that are of the “news” category, and another Episodes page that will list ALL posts that are of the “episodes” category.

Is [display-posts] deprecated or something? I see no reference to it on the X-theme documentation, but I see it mentioned here on the forum several times.

Either way, what is the simplest way to create pages that display posts of a specific category?

Hey @brian.earl.oneill,

Thanks for writing in!
Instead of creating pages for different categories and calling them via shortcodes, Just add categories as a menu items. Browse to Appearance >> Menu >> Categories and select your categories and add it to menu :slight_smile:

Hope this helps

Regards

Hi. Yes, this does help. Thank you. What I’d like to know now is how I can control the page template that displays the category archive. Can I create my own template for this? Can I modify an existing template? The image you’ve attached looks very different from the layout I see for my post listings page for my category.

Thank you!

Hello There,

Thanks for updating in! The category archive is using the index.php in X. You can only modify this if you will have to modify the code for the index.php or create it’s own archive.php file which would relay require you to install a child theme and must be familiar with WordPress template system.

By the way, [display-posts] shortcode is not a built in X shortcode. It came from a 3rd party plugin (https://wordpress.org/plugins/display-posts-shortcode/) which you need to install before it displays anything on a page.

You can also check out other alternatives from the plugin repository: https://wordpress.org/plugins/search/display+posts/

Hope this helps. Please let us know how it goes.