In wordpress let’s say I have page name “fashion” (e.g. mydomain.com/fashion) and a page name “art” e.g. (e.g. mydomain.com/art).
These pages have one template (the page template).
I want that all the posts that is categorized “fashion” to display in the fashion page and all the posts categorized “art” to display in the art page.
Now, I can make a template per page and then hard-code the post category name to display but I would like to have one template for all the pages and then let it know the category it should display.
The general idea is to assign a Category to your pages, the code you page.php (or other desired template) to handle post based on that assigned category.
Refael
ASKER
Hi madaboutasp,
This basically require me to hard-code the category name unless that i get all the categories on one page.
The general idea is to assign a Category to your pages, the code you page.php (or other desired template) to handle post based on that assigned category.