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 postm 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