title: Custom Wordpress template with custom category loop
body: <p>I'm trying to make a salesperson page template in wordpress.  Each page will have salesperson bio, contact and image.  All of this I can do.  What I also want is a section that queries the products that each salesperson sells.  The problem I'm running into is, not every salesperson sells the same products, so I can't have a standard loop that queries <code>x</code> category that I create. </p>
  
  <p>To solve the problem, I figured I could give each product (which is a custom post type in the theme) a category that is unique to the salesperson so the template would have a loop that would loop through products with <code>jim-products</code> category for jim the salesperson and products with <code>sally-products</code> category would be looped through for Sally the salesperson.  </p>
  
  <p>What I would like to avoid is making a new template for each category if I could.  I'm familiar with conditional formatting, and was thinking I could somehow do</p>
  
  <pre><code>if(in_category("sally-products"){
      "cat"=&gt; 11 //jim's cat
  }elseif(in_category("jim-products"){
      "cat"=4 //sally's cat
  }
  </code></pre>
  
  <p>but I can't really get a point where that would help in this situation.  And even further, if there was a way to somehow have the client create a category for x salesperson and then apply the category to the page that would be even better.  </p>
  
  <p>Hopefully, this makes sense.  </p>
  
  <p>Thanks in advance for the help. </p>