Skip to:
Content
Pages
Categories
Search
Top
Bottom

Loop through categories

  • @thebreiflabb

    Member

    Is there any way to loop through categories as such I can get each category with their sub-forums in their own blocks. For example:

    <div class=”category”>

    <div class=”category-title”>Category 1</div>

    <div class=”single-forum”>Forum 1….</div>

    <div class=”single-forum”>Forum 2….</div>

    etc.

    </div>

    <div class=”category”>

    <div class=”category-title”>Category 2</div>

    <div class=”single-forum”>Forum 1….</div>

    <div class=”single-forum”>Forum 2….</div>

    etc.

    </div>

Viewing 2 replies - 1 through 2 (of 2 total)
  • @thebreiflabb

    Member

    I figured out myself, added a counter to see if it is the first category, else the loop puts in a </div> before adding a new category, then after the loop adding a </div> to close the last one off.

    @thebreiflabb

    Member

    I figured out myself, added a counter to see if it is the first category, else the loop puts in a </div> before adding a new category, then after the loop adding a </div> to close the last one off.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar