How to create a post meta key / value page
-
I’m running a website about music. So we have post types like review, concert, interview etc. And one of the postmeta fields we register on post level is the (record) label.
A review could have the following URL: example.com/review/artist-name-album-name/
I’d like create a ‘archive’ page or pages for the labels too. So the URL should become something like this: example.com/label/label-name/
This page will show all posts that have a postmeta key label with postmeta value label-name.
I tried to find something that looks like this to get me started, but I couldn’t find anything. I have two main questions here:
– Is it the best / easiest way to create a page, label, in WP and link it to a specific custom template?
– How to get the 2nd level (example.com/label/label-name/) send as a parameter to the ‘page’ so I can retrieve posts for it?Thanks in advance for helping out!
- The topic ‘How to create a post meta key / value page’ is closed to new replies.