WordCamp ED in DC!
WordCamp Ed is a WordCamp focused entirely on educational uses of WordPress — in schools and universities. The inaugural WordCamp Ed will be held at George Mason University on Saturday, November 22nd featuring a morning of pre-planned speakers, and a barcamp-style afternoon breaking into smaller discussions and sessions.
I’ll be there and I’m hoping to see some of you.
Pure click-bait gold, baby!My wife insisted I add the comma. She claimed it wasn’t possible I really meant a solid gold click-bait baby despite my insistence that I meant exactly that. You know I’m focused on those high-traffic titles. And now on to the show . . . I’m doing a site for the esteemed Jon Becker’s school law class. The goal is to take tweets that exemplify really bad legal choices by public school administrators. They even have a hashtag – #schoollawwtf. Since we’re taking tweets into WordPress for further analysis we end up with some weird constraints. I can’t rely on useful titles if we want to automate this as the tweet content might contain any number of things and the regex to try to purify it wouldn’t be worth the hassle. New content wouldn’t have any body text either because it’s just a tweet. Granted, I could duplicate that text in the body but I didn’t really see much point in that. I opted to stick the tweet URL in a custom field. That soon led me to the handy wp_oembed_get function which was new to me.I really need to sit down and just read the whole codex. That worked very nicely for display on single posts (screenshot and code snippet below). Where it ended up failing […]
This post is going to attempt to document how I figured out how to mess with dates in WordPress custom fields. I don’t know how widely valuable that is but a number of the concepts are probably broadly applicable. This particular discussion will wander into areas of programistan and there is one child theme page involved.Although I now believe I could avoid that using FacetWP but I’ll leave in there for Alan’s sake. It’s live and working (although it may occasionally be down when I do something odd and it’s ugly as sin at the moment) but feel free to look around or add some fake events. Getting all posts with a custom field named ‘event’ to show on the front page was discussed here. I added a bit to the theme so that if there was more than one event on that day it’d display it with a different format. You can see the whole page on GitHub here. The other little chunk of code that might matter is what’s returned if there are no events on that day. It just tells you nothing is there and presents you with the events for the next seven days as defined by the FacetWP layout (which I’ll go over in a bit). Now that we had a decent way to see […]
We had a list of rampages sites in a Google Spreadsheet and wanted to know when they were created. I started to look that up but only managed to do it twice before I gave up and went in search of another way. In this case it took two little bits of code. This first piece is active on our generic site-wide plugin. It adds the blog’s creation date, last updated, and post count to the base JSON data. That’ll be handy in the future if we want to checkup on sites with only one query rather than multiple queries. This second piece is a Google Script that makes a function that I can call in the sheet by typing =getCreationDate(“http://someurl.com/”) The two together answer my immediate problem but the JSON modifications have some long-term value for us and might be useful to someone else.