Thank you. I also need different outputs according to my categories. Is it possible to add a custom parameter “template” to output posts according to template name?
The link above shows you three methods of defining the template.
If your post display is always by category, then you could use the post’s category to determine the template.
Alternatively, you could use the third method shown in the above link to manually specify the template used every time.
Thank you but it seems orderby rand and post per page attributes can’t work? I’d like to how one random post on my homepage.
I use [display-posts category=”my-category” layout=”my-layout” orderby=”rand” posts_per_page=”1″].
Then I use in my-layout.php the custom output.
Could you confirm please?
-
This reply was modified 6 years, 3 months ago by whoaloic.
-
This reply was modified 6 years, 3 months ago by whoaloic.