Support

Account

Home Forums Add-ons Repeater Field Organize Repeating Content by Category

Helping

Organize Repeating Content by Category

  • I am stuck and could use some advice. At work we created a list of living communities. I have been asked to organize them by location taxonomy (North,South,East,West). Currently we use the following code to display a list of the communities. This works fine.

        <ul>
            <?php
            $i = 1;
            while(has_sub_field('communities')):
            echo '<li><a href="' . get_permalink() . '#community-' . $i . '">' . get_sub_field('community_name') . '</a></li>' ;
            $i++;
            endwhile;
            ?>
        </ul>
    

    I created a taxonomy (‘community_location’) that uses the categories of the different locations. We are looking to organize the list this way:

    North

    • Community Name
    • Community Name
    • Community Name

    South

    • Community Name
    • Community Name
    • Community Name

    East

    • Community Name
    • Community Name
    • Community Name

    West

    • Community Name
    • Community Name
    • Community Name

    Any thoughts?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.