Edu-pumkin II – The Bava
I had to make a hole in the back of Jim’s head to let some of the hot air out. Still needs some work though as the candle keeps going out.
1 You should see what Santa looks like in our house.
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 […]
Sometimes people just want a little bit of WordPress. Before hanging a left with the anth101.com site, we pruned it waaaaay down and tried to make it as simple as possible. This is a pretty solid example that WordPress can be just about anything you want if you’re willing to put in a bit of time and effort. I figure having all these things in one place will help someone else (me most likely) at some point. Hide Posts from Other Authors If you have many authors, you often don’t want them seeing a bunch of posts in the admin area that they can’t edit. Make their lives easier and hide everything else. I believe this is where I found the code. Remove Sidebar Options To further clean up the sidebar for authors, the following code removes lots of things that you don’t want students bothering with anyway. You can get lots of details on this in the codex. Go to Directly to Post, Do Not Pass Dashboard This shunts people directly to the posts area rather than going to the dashboard on login. Posts in Single Column This sets the posts to single column display to simplify writing and was found here. Purify and Rename the Post Page This chunk removes certain meta boxes and restructures the language on […]
I often get requests from instructors that ask me to get WordPress to behave in a way that’s just different enough that WordPress fights them. Now that I can mostly program, I could make quick child themes to deal with this but that causes me the hassle of keeping all that stuff straight so I still do some quick and dirty stuff with plugins. This example is based on an instructor who wanted one particular category (lesson plans) to list from oldest to newest rather than the default WP blog layout of newest to oldest. That’s a pretty easy thing to do if you use the List Category Post plugin. Once you’ve got the plugin on and you’ve found the category id (mouse over the category when you’re in Dashboard>Categories and look for id= in the URL at the bottom of the page) all you need to do is put in [catlist id=9 numberposts=-1 order=asc] In this case, it says get the posts in the category with id 9, -1 means get all of them, and order them from lowest to highest/ or oldest/newest. That’s it. I’ve now got a page that shows all 41 lesson plans from oldest to newest and no child theme to keep track of.