Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

malibur on "How do I filter the Wordpress loop with a permalink variable"

$
0
0

Hi, I have been looking around for a solution, but have a hard time even knowing what to google to find answers.

What i want:

I have a wordpress template that lists all the content of a custom post type called albums

all these albums have a field that contains their release date.

now i'd like a selectbox on that same template to make the loop only show the albums released in the selected year. i.e all albums from 2012.

Is there a way to extend the permalink site.com/albums, to site.com/albums/2012, and make that filter the loop to only show the albums with that release date?

my custom field is called release-date.

in other words can i get that permalink /year become a variable that i can use in the template? or is there a better approach to get that same result?

If anyone can point me to articles or tutorials about this, or even suggest an approach, that would be very helpful.

Thank you so much!


Viewing all articles
Browse latest Browse all 8245

Trending Articles