On WordPress, I have created “Categories” under “Posts”. So what I’ am doing is adding new “Post” under their respective Category. Example of some Category are “Photo Gallery, Press Releases, Video Gallery”.
Now, I’ am trying to display from category slug “press-releases”. So my URL structure will be www.example.com/press-releases/xyz
I have already read the documentations and few other blogs regarding this but can’t really seem to understand. I’ am abit confused when it come to doing this. Can anyone help me.
There is probably few ways to do this I would say the easy way would be to create a template-page like this:
PHP CODE
This will create a template page for you, now create a new page in your WP.
Call it what ever you like
on the right side you will see “Template” drop down menu. From this menu select this template you have just created and you are good to go.
Try this code:
Just replace “CATEGORYNAME” with your category name whereever you want:
Thanks