LH Relationships is a WordPress plugin that enables the creation of true post to post relationships. More information for the rationale driving this is available here. It was built as a core part of the LocalHero project. It is the second in a series of plugins to enable WordPress to be a true semantic blog engine. More documentation and content will be added in time concerning the plugin.
Unlike other post relationship plugins all relationships are defined as RDF triples i.e. each relationships consists of a subject, a predicate and an object. With each part of the triple being a post object in the wp posts database. In the future it is planned to enhance the realtionships to allow relationships between other wordpress object types like users and somments.
Once activated it will create three tables to enable post to post relationships. Those tables are wpstatement which holds the actual triples, wppredicate which defines the predicates, and wpnamespace which defines the namespaces that the predicates belong too.
There are two ways of defining triple relationships.
For any WordPress post type eg post, page, attachment, and the LH Relationships defined WordPress post type object: lh-uri, this plugin creates a RDF Post Relationship dialogue form to the edit screen. The subject is always the post being edited, the predicate can be defined via the drop down, and to populate the object simply add a post id of another relevant post. The triple relationshipÂ is then added to the database, is available programatically, and is outputted in the rdf feed for further manipulation
LH Relationships also allows triple relationships to be specified by the use of machine tags. When a machine tag is added to a post type, LH-Relationships will remove the tag from the post type and add the triple relationship to the database.
The format for adding these machine tags being: rdf:type=http://purl.org/NET/c4dm/event.owl#Event
where post being tagged is the subject, rdf:type being the namespace and fragment (collectively the predicate) and http://purl.org/NET/c4dm/event.owl#Event being the object. This approach to adding triples can be very useful as it allows triples to be assigned quickly and in bulk. Furthermore it is accessible to external wordpress tools like the wordpress app or IFTT which do not directly access the wordpress admin screens but can add tags to posts.If you like this plugin please consider making a donation to further development