Custom Fitted WordPress

flickr photo shared by Internet Archive Book Images with no copyright restriction (Flickr Commons)

I’ve been doing a whole lot of WordPress customization lately for really widely varying purposes/people. It has been a lot of fun and it’s an option that I’m not sure has been conveyed well to our faculty.

Many times, faculty are looking for a process for students (or one another) that is semi-structured. The students have options but they need help remembering to do certain things (include at least one image, consider these three topics, add a link, etc.) or they need a bit of guidance to help create uniformity of some sort. If you’ve ever asked more than ten people to answer three questions in an email then you know that virtually all the humans fail to follow directions when given the chance.1 You’ll also see the width and depth of human imagination if you ask someone to fill in a text field answering a question you really thought was straight forward.2

There are also concerns about the complexity of WordPress that we can address through custom post types and custom user roles while still allowing for a good deal of flexibility within our established constraints. This interplay of custom fields, custom post types, and usually a custom theme to display the former is probably best seen in some examples. If you read this blog, you’ve seen me handle this before with Gravity Forms. You’ve still got that option but getting a bit deeper into the coding side of things enables a much greater degree of control and I think you’ll see some advantages (admittedly with increased overhead on creation/modification).

The pieces below will just explain what happened, why, and what it enables in two projects. I’ll probably do individual posts on the code behind it at some point in the future.

Erasure Poetry

Screen Shot 2016-09-01 at 10.20.24 AM

I’ve been working on allowing users to submit blackout/erasure poems for a really fun project Molly is running on Artfulness (mindfulness meets art as created by VCU faculty).

This is based on a custom post type. It was done mainly to allow for a different layout/look and to separate the content from the regular pages while still allowing for parent/child relationships (the blackened poems should be associated with their source text). No one wants a bunch of wacky poems overwhelming their pages list. In this case, I was also trying to do it purely through a plugin rather than needing an additional custom theme.

Screen Shot 2016-09-01 at 10.34.44 AM

So this adds a ‘Poems’ module to the sidebar and I chose an eye icon to represent it and when we go to ‘Poems’ we see a layout that’s parallel to what you’d normally see in
Screen Shot 2016-09-01 at 10.47.17 AM

Poems have a title and body like a normal page but they have three additional custom field elements- a source title, source url,3 and associated Gravity Form.4

erasure poem - custom fields

That’s nice and organized but it also lets us do a custom display and associate the poems in ways that help us navigate.

earasure poetry tutorial

So it looks pretty good so far. Once the site it live, I’ll link you to the actual site.

World Languages OER

Screen Shot 2016-09-01 at 11.13.30 AM
The goal was to create some consistent structure for the creation of language lessons. I built a custom post type called ‘Modules’ and it’s composed of a few different custom fields. You can see the breakdown below but essentially it’s guiding a faculty member through the main elements of construction they’ll need to consider but not binding them regarding what’s in each element. They have the freedom to put in images, links, and format the text in each component just like they’d do in a typical post. We just have the advantage of being able to guide that entry and then do more interesting things with the results on the display side.

In this particular case, I used ACF to create the custom fields. That was mainly to see if it was much faster/easier than doing it via functions.php. I don’t think there was much difference on my end but ACF does allow faculty to change directions or modify elements of the custom fields which is a big deal if you’re working to increase their independence and enable a deeper ownership of the site. It may or may not help my support request load. We’ll have to see.

custom post type interface

Since we can easily isolate the ‘learning goals’ as an element (rather than trying to parse it out of the post content as a whole), we can customize our theme to treat it very differently. In this case, since it’s a section that’s mainly targeted at the professor, I made it a collapsible/expandable section via the theme.

I also did some display work to better delineate the segments of the lesson etc. It’s the tip of the iceberg in terms of what might be done given time/interest. The bottom line being that WordPress can be what you want/need it to be if you’re willing to invest the time and energy.

1 Inevitably, you’ll get anywhere from 1 to 12 questions answered and you’ll be presented with 17 additional questions, 9 complaints, and a link to something off-topic. 60% of the responses will be reply all. This is why Google Forms are so popular.

2 You might think there’s a limited number of ways to answer something simple like “What’s your favorite website?” but you’ll get everything from titles, to sentences, some URLs, URLs with sentences, a poem that includes HTML and someone will somehow submit a video where they tell you about their website.

3 Cite right? Right.

4 I ran out of time/patience with non-user authentication in the REST API . . . a failure but I did learn quite a bit.

Comments on this post

  1. [redacted] said on September 1, 2016 at 10:44 am

    Is that an 18th century picture of Downes in that OER Custom Post Type? The OL Daily of yore?

    • Tom Woodward said on September 1, 2016 at 10:56 am

      Weird info from whoever submitted this so I deleted that but kept the comment. If it’s spam, it’s the smartest spambot ever.

Trackbacks and Pingbacks on this post

  1. Courses in WordPress – Bionic Teaching said on April 18, 2017 at 9:11 am

    […] addition to the big Artfulness site (which does a number of neat tricks- one of which is documented here) Molly is also teaching a course with students this […]