So the title pretty much says it all. I need a piece of shortcode that will allow me to insert a link to the latest coupon for a specific model of computer. The coupon is a custom post type with a taxonomy of model, of which each specific model is a different term. I basically need a shortcode like this:
[coupon model='model one']
This should allow me to specify a specific term, or model one in the example, that I want to pull the latest coupon for. I know how to assign the model attribute to the coupon shortcode that I have registered, but then my brain starts turning into mush. Can someone give me a little push?
Update: I basically need something like a small loop, pulling only the permalink for 1 post of a specific category. Except it needs to be a taxonomy instead of category, and it needs to be in a format I can insert directly into the post editor, i.e. shortcode.