View Single Post
Old 02-09-2014, 04:07 PM  
Tittytweaker
Confirmed User
 
Tittytweaker's Avatar
 
Industry Role:
Join Date: Dec 2012
Posts: 184
WP Template Hierarchy - Same theme across entire taxonomy, but different info depending on term?

So far, I'm just throwing together a layout on one model, which you can see here, but eventually I want to roll it out across my entire model taxonomy. I'd like to do this by simply applying the theme to the model taxonomy(taxonomy-model.php), and not by creating a new template for each and every model in the taxonomy (taxonomy-model-asa-akira.php, etc etc etc)

But, I can't think of any other way to input unique information on to each individual models page without creating a new template for each model.

Right now I can pull up their photo and name by grabbing the term slug. That will work the same for each and every model. How would I go about doing something similar with, say, their twitter page, official website, etc? Many other sites have profiles for each model, usually thousands of them, how do they do that?

Is there some way to lay out every page like:

<div class="profile">

<div class="twitter(code to grab slug)"></div>
<div class="facebook(code to grab slug)"></div>
<div class="officialsite(code to grab slug)"></div>


</div>

And have something similar to a css file this:

Twitter:
.model-one {twitter.com/model-one}
.model-two {twitter.com/model-two}
.model-three {twitter.com/model-three}
.model-four {twitter.com/model-four}

Official site:
.model-one {model-one.com}
.model-two {model-two.com}
.model-three {model-three.com}
.model-four {model-four.com}

Having thousands of templates for each model would be a nightmare in the event of a redesign. If anyone has any idea on how to accomplish this, or can shed some light on how the big guys manage these links and information, I'd appreciate it.

~TT
__________________
www.tittytweaker.com
Tittytweaker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook