User Taxonomies – Categorize Your WordPress Users




Geniuswp show

Summary: UPDATE, MAY 2020This post is now six years old, and technology has moved on. Today, we would take a different approach to building a directory of WordPress Users.Please read our new post describing how to useCiviCRM to create and customize a public, organized display of user profiles. This is Tadpole’s specialty and we’re happy to talk with you about it – feel free to reach out.The following should only be read for reference – there are better, easier ways to do this stuff now :-)Original articleThis article is a demonstration of how to implement user taxonomies on a WordPress website. It is the subject of a WPNYC Meetup presentation I am giving tonight! The code used in this project can be found on Github, and is freely available to all.Recently we rebuilt ArtsWestchester.org. The project had the following requirements:The site has two kinds of users: Artists, and Cultural OrganizationsAll users have their own page, which displays their blogs posts, events, and bio. “Artist” profiles and “Cultural Organization” profiles display slightly different informationThe site displays users in two directories, each with their own different categories. For example, Artists have categories like Dance, Music, and Film; Cultural Organizations have categories like Libraries, Museums, and Galleries.A visitor to the site can browse through either the Artist Directory or the Cultural Organizations Directory:Each directory lists categories and each category has its own icon:Clicking into a category icon leads to a list of user profiles associated with the category:And clicking an individual entry brings you to the user profile page:If you have some experience with WordPress, you may have noticed a pattern. The “category” pages here are strikingly similar to the usual WordPress category archive pages, which list all the posts under a category (e.g. “mywebsite.com/category/news/”). The “directory” pages are analogous to a page that lists all the categories on your website, with each category name being linked to its corresponding category page.The difference is that we’re categorizing users instead of posts. Weird? A little. But WordPress provides for this. In its way of thinking, “posts” and “users” are sort of the same. They are both “objects” – meaning, they are both things that have a defined structure and certain qualities. As developers, we can take these objects and do things with them – like assign them to categories and list them all out on a page.TaxonomiesCategories and Tags have a fancy name: Taxonomies. This just means ways of organizing things. All the categories on your WordPress website are collectively known as a taxonomy: the “category” ta... You are listening to the topic about "User Taxonomies – Categorize Your WordPress Users", if you want to read the full article, please visit https://geniuswp.com or the link in the description.