Pat Lockley (of the pedagogical and technical outfitters Pgogy Webstuff) and I did a thing last week: HeyPressto, a WordPress and ClassicPress conference which happened only on Twitter. That’s right, a conference on Twitter: presentations were a series of 15 Tweets, one per minute with the conference hashtag, in a scheduled time slot. Adding images, gifs or links to the tweets allows presenters to go into a bit more depth than Twitter’s character limit would suggest. Replies to tweets, and other forms of engagement, allow discussion to develop around the issues raised. It was also semi-synchronous–or asynchronous after the event if you like: the tweets persist, they can be revisited, engagement can be continued. One way in which the tweets persist is that Pat turned all the presentations into Twitter moments, so first thing you should do if you missed the event is to go to the schedule page and look at some of the presentations that are linked from it.
Tag Archives: WordPress
HeyPressto! a WordPress and ClassicPress conference on Twitter
Pat Lockley (of Pgogy Webstuff) and I are organizing the 2020 Hey Pressto! conference on WordPress and ClassicPress, which will run on 24 September 2020.
HeyPressto happens only on Twitter — presentations are made up of up to 15 tweets, one per minute. You may know that Pat has been involved in organizing the PressEd Conference with Natalie Lafferty for the last three years. When he asked whether I was interested in helping with a similar conference I jumped at the idea. The theme is generalized from PressEd, which focusses on WordPress in Education, to include any use of WordPress or ClassicPress. What ever you are doing with WordPress or ClassicPress, whether you are writing blog posts, running an aggregator, managing content, creating themes and plugins, contributing to the core, or concerned with governance, we would love to hear from you. We have a call for proposals which is open until midnight on Thursday Sept 3rd.
Using the WordPress REST API to post a book from WikiSource to PressBooks with python
I am using Pressbooks to build an online edition of Southey and Coleridge’s Omniana. I transcribed the text for Volume I on wikisource. This post is about how I got that text into pressbooks; copy and paste didn’t appeal, so I thought I would try using the WordPress REST API. You could probably write a PHP plugin that would do this, but I find python a bit easier for exploratory work, so I used that.
Getting the data from Wikisource is reasonably trivial. On wikisource I have transcluded the page transcriptions into a single HTML file of the whole book. This file is relatively easy to parse into the individual articles for posting to Pressbooks, especially as I added <hr />
tags before each article (even the first) and added stop
at the end.
In the longer term I want to start indexing the PressBook Omniana using wikidata for linked data. This will let me look at the semantic graph of what Southey and Coleridge were interested in. Continue reading
PressBooks and ePub as an OER format.
PressBooks does a reasonable job of importing ePub, so that ePub can be used as a portable format for open text books. But, of course, there are limits.
I have been really impressed with PressBooks, the extension to WordPress for authoring eBooks. Like WordPress it is available as a hosted service from PressBooks.com and to host yourself from PressBooks.org. I have been using the latter for a few months. It looks like a great way of authoring, hosting, using, and distributing open books. Reports like this from Steel Wagstaff about Publishing Open Textbooks at UW-Madison really show the possibilities for education that open up if you do that. There you can read what work Steel and others have been doing around PressBooks for authoring open textbooks, with interaction (using hypothe.is, and h5p), connections to their VLE (LTI), and responsible learning analytics (xAPI).
PressBooks also supports replication of content from one PressBook install to another, which is great, but what is even greater is support of import from other content creation systems. We’re not wanting monoculture here.
Open text books are, of course, a type of Open Educational Resource, and so when thinking about PressBooks as a platform for open text books you’re also thinking about PressBooks and OER. So what aspects of text-books-as-OER does PressBooks support? What aspects should it support?
Using wikidata for linked data WordPress indexes
A while back I wrote about getting data from wikidata into a WordPress custom taxonomy. Shortly thereafter Alex Stinson said some nice things about it:
@philbarker This is a really cool use of @Wikidata: https://t.co/vK82OrWOG2 ! Is this something that could be made an extension/tool for wordpress? seems like a powerful way to connect Wikidata to more web content cc’ @Auregann @nightrose @johl
— Alex Stinson (@sadads) January 19, 2018
and as a result that post got a little attention.
Well, I have now a working prototype plugin which is somewhat more general purpose than my first attempt. Continue reading
Publications on WordPress
I have posted details of my publications on this site. More interestingly, I did so with a plugin and theme extension which builds on previous work on presenting publications in WordPress and using WordPress as a semantic platform. These are useful steps towards WordPress as a lightweight repository. Continue reading
Getting data from wikidata into WordPress custom taxonomy
[there is an update of this work]
I created a custom taxonomy to use as an index of people mentioned. I wanted it to work nicely as linked data, and so wanted each term in it to refer to the wikidata identifier for the person mentioned. Then I thought, why not get the data for the terms from wikidata?
Reflections on a little bit of open education (TL;DR: it works).
We are setting up a new honours degree programme which will involve use of online resources for work based blended learning. I was asked to demonstrate some the resources and approaches that might be useful. This is one of the quick examples that I was able to knock up(*) and some reflections on how Open Education helped me. By the way, I especially like the last bit about “open educational practice”. So if the rest bores you, just skip to the end. Continue reading
Shared WordPress archive for different post types
In a WordPress plugin I have custom post types for different types of publication: books, chapters, papers, presentations, reports. I want one single archive of all of these publications.
I know that the theme template hierarchy allows templates with the pattern archive-$posttype.php, so
I tried setting the slug for all the custom post types to ‘presentations’. WordPress doesn’t like that. So what I did was set the slug for one of the publication custom post types to ‘presentations’, that gives me a /presentations/ archive for that custom post type(1). I then edited the archive.php
file to use a different template parts for custom post types(2):
<?php $cpargs = array('_builtin' => False, 'exclude_from_search' => False); $custom_post_types = get_post_types( $cpargs, 'names', 'and' ); if ( is_post_type_archive( $custom_post_types ) ) { get_template_part( 'archive-publication' ); } else { get_template_part( 'archive-default' ); } ?>
See anything wrong with this approach? Any comments on how better to do this would be welcome.
Notes:
- 1 could edit the .htaccess file to redirect the /books/, /chapters/ …etc archives to /publications/, which would be neater in some ways but would make setting up the theme a bit of a faff.
- Yes, the code gives all the custom post types with an archive the same archive. That’s fixable if you make the array of post types for which you want a shared archive manually.
Three resources for custom metadata in WordPress
When developing WordPress for use as a CMS one approach I have used is to create a custom post type for each type of resource and custom metadata boxes for relevant properties of those types. I’ve used that approach when exploring the possibility of using WordPress as a semantic web platform to edit schema.org metadata, when building course information pages for students and am doing so again in updating some work I did on WordPress as a lightweight repository. Registering a custom post type is pretty straightforward, follow the example in the codex page, I found handling custom metadata boxes a little more difficult. Here are three resources that helped.
Doing it long hand
It’s a few years old, but I found Justin Tadlock’s Smashing Magazine article How To Create Custom Post Meta Boxes In WordPress really useful as a clear and informative tutorial. It was invaluable in understanding how metaboxes work. If I had only wanted one or two simple text custom metadata fields then coding them myself would be an option, but I found a couple of problems. Firstly, I was repeating the same code too many times. Secondly when I thought about wanting to store dates or urls or links to other posts, with suitable user interface elements and data validation, I could see the amount of code needed was only going to increase. So I looked to see whether any better programmers than I had created anything I could use.
Using a helper plugin
I found two plugins that promised to provide a framework to simplify the creation of metaboxes. These are not plugins that provide anything that the end user can see directly, rather they provide functions that can be used in theme an plugin development. They both reduce the work of creating a metabox down to creating an array with the properties you want the metabox to have. They both introduce a dependency on code I cannot maintain, which is something I am always cautious about in using third-party plugins, but it’s much more viable than the alternative of creating such code from scratch and maintaining it myself.
CMB2 is “a metabox, custom fields, and forms library for WordPress that will blow your mind.” It is free and open source, with development hosted on GitHub. It seems quite mature (version 1.0 was in Nov 2013), with a large installation base and decent amount of current activity on github.
Meta Box is “a powerful, professional developer toolkit to create custom meta boxes and custom fields for WordPress.” It too is free and released under GPL2 licence, but there are paid-for extensions (also GPL2 licensed) and I don’t see any open source development (I may not have looked in the right place). Meta box has been around for a couple of years, is regularly updated and has a very large user base. The paid-for extensions give me some hope that the developers have a sustainable business model, but a worry that maybe ‘free’ doesn’t include the one function that at sometime I will really need. Well, developers cannot live on magic beans so I wouldn’t mind paying.
In the end both plugins worked well, but Meta Box allows the creation of custom fields for a link from one post to another, which I didn’t see in CMB2. That’s what I need for a metadata field to say that the author of the book described in one post is a person described in another.