Author | Replies |
---|---|
traversal | # Posted on August 1, 2014 at 11:05 am |
Hey there. Certainly using the value method is the right way to go, as using the “field” method returns you an object, which will indeed always be unique. There is one alternative way to do this however. Assuming your store was a post type, and that your field set was called “address”, try something like this: The $wf->stores call will give you a collection of store posts, which I’ve ordered by title ascending. You can then call WOOF_Collection::group_by passing in “address.city” to indicate the field “city” in field set “address”, to group by that field. group_by returns an associative array with: So you’re outer loop then displays the cities, and has an inner loop which loops over the stores for that city. This is more concise, but certainly less obvious than your approach (which is perfectly valid too!). |
Ability to deactivate licence domains within MasterPress account management
25th October 2024
We have just rolled out an account management feature which allows licence holders to have better control over the domains that use their licence key. From the MasterPress Account Management page, the list of Active Sites that use your licence now includes a function that allows you to remove a domain from your licence. Simply…