Title: Nested Items
Last modified: February 1, 2022

---

# Nested Items

 *  Resolved [polarracing](https://wordpress.org/support/users/polarracing/)
 * (@polarracing)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/nested-items/)
 * Hi,
    can items like loop, if, etc. be nested?

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

 *  Plugin Author [Tangible](https://wordpress.org/support/users/tangibleinc/)
 * (@tangibleinc)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/nested-items/#post-15321978)
 * Yes they can! For example:
 *     ```
       <Loop type=taxonomy_term taxonomy=category>
         <If loop type=post taxonomy=category terms="{Field id}">
           <h2><Field title /></h2>
           <ul>
             <Loop type=post taxonomy=category terms="{Field id}">
               <li><a href="{Field url}"><Field title /></a></li>
             </Loop>
           </ul>
         </If>
       </Loop>
       ```
   
 * In this example, the outer Loop is listing categories with their titles as headings.
   The If statement is testing whether a post loop exists for the taxonomy term,
   and the inner Loop is getting those posts as a list of linked titles. In the 
   example the Loop context is being passed to inner loops via `terms="{Field id}"`.
 * Does that answer your question?
 *  Thread Starter [polarracing](https://wordpress.org/support/users/polarracing/)
 * (@polarracing)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/nested-items/#post-15322897)
 * Yeah, thanks.

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

The topic ‘Nested Items’ is closed to new replies.

 * ![](https://ps.w.org/tangible-loops-and-logic/assets/icon.svg?rev=2535522)
 * [Loops & Logic](https://wordpress.org/plugins/tangible-loops-and-logic/)
 * [Support Threads](https://wordpress.org/support/plugin/tangible-loops-and-logic/)
 * [Active Topics](https://wordpress.org/support/plugin/tangible-loops-and-logic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tangible-loops-and-logic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tangible-loops-and-logic/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [polarracing](https://wordpress.org/support/users/polarracing/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/nested-items/#post-15322897)
 * Status: resolved