harvardchanschool / multisite-taxonomies Goto Github PK
View Code? Open in Web Editor NEWA WordPress plugin to register custom taxonomies accessible on your entire multisite network.
License: GNU General Public License v3.0
A WordPress plugin to register custom taxonomies accessible on your entire multisite network.
License: GNU General Public License v3.0
Hello! Me again. Thanks for your work! ๐
Tldr.: Are you interested integrating user- and blog-terms (assigning multisite-terms not only to posts, but to sites and users)? You can find the implementation for users here.
And the longer version:
I was working on adding multisite-taxonomies to network-users for the last few days:
$taxonomy_slug = 'job';
$object_type = 'user';
register_multisite_taxonomy( $taxonomy_slug, $object_type, $args );
The taxonomy-selectbox appears on the profile-page of a user.
Everything works the same as before for other taxonomies.
We are a big university (with ~20k people) which is grouped into many faculties, wich are subgrouped into organisations, and sub-communities (of students and teachers).
Imagine a big category-tree-structure (with ~300 entries), let's call them affiliations
.
We want to assign those terms to users, blogs and also posts and make the right blogs/posts visible/filterable for the right group of people.
We use the same tree of taxonomies three times: for users, blogs, and posts.
I wrote a library to sync terms between taxonomies (and everything is working fine), but it is not a pleasure to work with:
affiliations
live.affiliations
. Map them to the blog-affiliation's term id$object_types = array( 'user', 'post' );
register_multisite_taxonomy( $taxonomy_slug, $object_types, $args );
wp_multisite_term_multisite_taxonomy
could be used to create unique multisite_term_multisite_taxonomy_id
s for (non-post) object_types.Chances
What do you think? - Should I create a PR? - Or should it just live in our fork?
Thanks for your time!
count is 0 on insert to table, but should increment
First of all thanks a lot for this plugin, it takes the project I'm working on for a university a long way already.
Internally we are using two multisite taxonomies, one for posts (global_post_tag
) and one for comments (global_comment_tag
, assigned to the post).
The rewrite rules for the pseudo archive pages are registered and working, see screenshot from Query Monitor:
Could you give me a hint on how to implement an archive page that includes all posts in the multisite tagged with wordpress
in one of the before mentioned taxonomies?
My current approach is to use the Multisite_Taxonomy_Query
class alongside the pre_get_posts
filter to set up the query. I saw that you are working on an example plugin https://github.com/HarvardChanSchool/multisite-taxonomies-frontend, but it's not working outside your context yet (missing functions like is_multitaxo()
).
Thanks a lot for a quick feedback on this.
We need to hook into the 'delete_post' action to remove any potential association with some multisite terms.
We need to look into a way of supporting nice permalinks without using switch_blog
. Posts returned by Multisite_WP_Query are currently returning an "ugly" permalink ?p=$postID
.
How to install and use this plugin? There is no documentation or readme file. i just installed and trying. But only one menu is available.
We have many cases where different blog_ids (site_ids) have the same term and the same post_id (object_id). The function is not setting the term the second time. Query in line 1971 is not specifying blog_id when checking if post already has this term. It continues (without setting) if term is found for post_id regardless of blog_id.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.