Title: Loop not filtering properly
Last modified: August 21, 2016

---

# Loop not filtering properly

 *  Resolved [iamarogue](https://wordpress.org/support/users/iamarogue/)
 * (@iamarogue)
 * [12 years ago](https://wordpress.org/support/topic/loop-not-filtering-properly/)
 * Hi there,
 * I really like your plugin, but I’m having a little issue getting it set up.
 *     ```
       <h1>Our Products</h1>
       [loop type="product" product_cat="planning" orderby="rand" columns="3" pad="0px 10px" count="3"]
         <a href="[content field="url"]"><h3>[content field="title"]</h3></a>
         [content field="excerpt" more="true"]
       [/loop]
   
       <h1>Recent Projects</h1>
       [loop type="project" project-category="housing-plans" orderby="rand" columns="3" pad="0px 10px" count="3"]
         <a href="[content field="url"]"><h3>[content field="title"]</h3></a>
         [content field="excerpt" more="true"]
       [/loop]
       ```
   
 * The first loop runs perfectly correctly. I copied and pasted, then changed the
   post type and taxonomy for the second one. The second works fine EXCEPT that 
   it doesn’t filter by taxonomy at all (currently the output is all projects, well
   3 of them anyways).
 * My content page says:
 * > Project Categories – project-category
   > Housing Plans – housing-plans
   >  Our Planning & Policy Products – planning Our
   > Tools You Can Use – tools Plans to End Homelessness – plans-to-end-homelessness
   > Point in Time Homeless Counts – point-in-time-homeless-counts Professional 
   > Development & Coaching – project-training Program Development – program-development
   > Program Evaluation – program-evaluation Research & Evaluation – project-research
 * [https://wordpress.org/plugins/custom-content-shortcode/](https://wordpress.org/plugins/custom-content-shortcode/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [12 years ago](https://wordpress.org/support/topic/loop-not-filtering-properly/#post-4959379)
 * Hello,
 * Here is the syntax for filtering by taxonomy:
 * `[loop type="project" taxonomy="project-category" value="housing-plans"]`
 * I see that the documentation is not clear on this point, so I’ll make a note 
   to update it.
 * It’s nice to see how you’re using different plugin features like columns, random
   order, content overview. Please let me know if you need more information.
 *  Thread Starter [iamarogue](https://wordpress.org/support/users/iamarogue/)
 * (@iamarogue)
 * [12 years ago](https://wordpress.org/support/topic/loop-not-filtering-properly/#post-4959394)
 * Awesome, that works perfectly. Well of course it should, you wrote the plugin!
 * I guess I was getting thrown off by the fact that the first loop functioned correctly(
   which was probably some sort of fluke).
 * Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Loop not filtering properly’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [iamarogue](https://wordpress.org/support/users/iamarogue/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/loop-not-filtering-properly/#post-4959394)
 * Status: resolved