CSS for Resizing Video
Just a handy chunk of CSS to make your video embeds behave better. It’s out there but not a bad thing to spread farther.
Here’s a quick video of a browse-by-color example I made in about ten minutes this AM prior to a meeting with a faculty member in our fashion program. This one is using FacetWPYou could easily do this by hand now with the WP JSON data but it’d take a bit longer. which is acting on a custom field I creatively named ‘color.’ It seems like it’ll be useful to some disciplines and we have the option to do lots of automated patterns using Color Thief to grab pallets. The video is also one way we might start sharing examples of what we can do in various platforms. There’s significant need to show that internally and for external faculty so people get a better idea of their scope of options.
It wasn’t too long ago I wrote my first WordPress plugin. Essentially, I Googled “wordpress plugin tutorial” and wandered from there. Another helpful piece for me is downloading plugins that do something close to what I want and trying to figure out what they did. Inspired in part by Boone Gorges and his description of how he handled iframe embed issues in multisite, and David asking for some way for students to embed Debate Graph I figured I could write a plugin to allow a shortcode embed for that site. The dead simple example is below.I cut out the plugin comment stuff for clarity but you’ll need it. It allows you to put [debategraph url=”http://debategraph.com/whatevertheurl”] and it returns the needed embed code. I’ll probably set it up with height/width as a user option but I wanted it as pure as possible initially. I’ll also need to tie them in with the main WP editor sooner or later. In writing this and trying to piece together how I figured this out, I also found this shortcode generator which might be very helpful in the future. This was hidingor obviously located at the bottom of the WP Codex page on shortcodes. This is pretty much a barebones template so when we had a little stutter this morning around embedding Google Forms. I […]
I think this is kind of a neat WordPress theme trick. You can download/fork it here if you want or go over here and try it out. I took the mixitup child theme from a little while back and modified it a bit. This new page template uses posts rather than attachments and adds the page text above the images. It is also smarter about removing some of the sorting categories it displays for the posts. Directions create a page name that page the same name as one of your category posts apply the template (Featured image sort by page name/category) now all the posts from that category show up under the body of that post in sortable format The Changes I’m trying out the Syntax Highlighter plugin given how much more often I’m posting code lately. I also really commented up the page. I am still struggling to find a decent way to do this kind of exposition about code and the process it took to figure out the code.