July 9, 2019
Why Bootstrap websites make me want to die!
Were you ever in one of those meetings, where ideas are flying and everyone is getting all excited about the prospects of a new project? Inevitably someone makes a suggestion that sounds way smarter than everyone else’s suggestion and everyone differs to the one with the crazy smarts in the room, riffing off their initial […]
read...
April 17, 2019
Location based marketing and the cult of celebrity.
Current digital marketing relies on recorded searches and past buying behaviour. It tries to anticipate the needs of the consumer by serving up ads based on all that experience – but it doesn’t take into account context, convenience or purchase priming. As a result, users are bombarded by ads, at all times, in hopes of […]
read...
September 5, 2018
The ins and outs of digital ad specs…
This may look like a weird article to make if you’ve ever had agency experience, but if you’re the sole front-end developer of a large company getting ad requests that are, at best, a hand-wavy “just make it go” approach with no documentation, this might save you weeks of head-slapping monotony and explanation. I’ve been doing […]
read...
April 13, 2017
Simple trick to get around WordPress Caching plugins Caching your dev files
If you’re like me and enjoy the ass clenching thrill of working on a live site without a testing server, sometimes caching plugins can be a real hassle. Get around this by adding a little dynamic date versioning to your non-cachable files. Like CSS and custom JS files. Don’t say Uncle Dave doesn’t love you. […]
read...
January 10, 2017
WordPress Command Line Tool
Here’s a neat little tool that allows you to manage your worpress sites straight from your server’s command line. It’s a must for people who want to start learning how the backend of this magnificent platform actually does it’s magic. And it’ll allow you to run your suite of sites more efficiently. What could possibly […]
read...
November 4, 2016
List site users and add custom fields to user profiles.
Wouldn’t it be nice to list all your authors and blog contributors on one page. And even have the control of filtering and displaying the key players, vs just the authors? Wouldn’t it be cool to have the person’s bio, and any associated links come up in that same list? Here you go: [pastacode lang=”php” manual=”%3C%3Fphp%20%0Aadd_action(%20’show_user_profile’%2C%20’my_show_extra_profile_fields’%20)%3B%0Aadd_action(%20’edit_user_profile’%2C%20’my_show_extra_profile_fields’%20)%3B%0A%0Afunction%20my_show_extra_profile_fields(%20%24user%20)%20%7B%20%3F%3E%0A%0A%09%3Ch3%3ELeadership%20(Meet%20Us)%20Section%3C%2Fh3%3E%0A%09%3Cp%3EThe%20following%20section%20is%20only%20for%20the%20senior%20leadership%20team.%20Leave%20it%20blank%20to%20reduce%20this%20profile’s%20prominence.%3C%2Fp%3E%0A%09%3Ctable%20class%3D%22form-table%22%3E%0A%0A%09%09%3Ctr%3E%0A%09%09%09%3Cth%3E%3Clabel%20for%3D%22job%22%3EJob%20Title%3C%2Flabel%3E%3C%2Fth%3E%0A%0A%09%09%09%3Ctd%3E%0A%09%09%09%09%3Cinput%20type%3D%22text%22%20name%3D%22job_title%22%20id%3D%22job_title%22%20value%3D%22%3C%3Fphp%20echo%20esc_attr(%20get_the_author_meta(%20’job_title’%2C%20%24user-%3EID%20)%20)%3B%20%3F%3E%22%20class%3D%22regular-text%22%20%2F%3E%3Cbr%20%2F%3E%0A%09%09%09%09%3Cspan%20class%3D%22description%22%3EPlease%20enter%20your%20Job%20Title.%3C%2Fspan%3E%0A%09%09%09%3C%2Ftd%3E%0A%09%09%3C%2Ftr%3E%0A%09%09%3Ctr%3E%0A%09%09%09%3Cth%3E%3Clabel%20for%3D%22job%22%3EOrder%3C%2Flabel%3E%3C%2Fth%3E%0A%0A%09%09%09%3Ctd%3E%0A%09%09%09%09%3Cinput%20type%3D%22text%22%20name%3D%22order_by%22%20id%3D%22order_by%22%20value%3D%22%3C%3Fphp%20echo%20esc_attr(%20get_the_author_meta(%20’order_by’%2C%20%24user-%3EID%20)%20)%3B%20%3F%3E%22%20class%3D%22regular-text%22%20%2F%3E%3Cbr%20%2F%3E%0A%09%09%09%09%3Cspan%20class%3D%22description%22%3EPlace%20users%20in%20order%20of%20this%20number.%3C%2Fspan%3E%0A%09%09%09%3C%2Ftd%3E%0A%09%09%3C%2Ftr%3E%0A%0A%09%3C%2Ftable%3E%0A%3C%3Fphp%20%7D%0Aadd_action(%20’personal_options_update’%2C%20’my_save_extra_profile_fields’%20)%3B%0Aadd_action(%20’edit_user_profile_update’%2C%20’my_save_extra_profile_fields’%20)%3B%0A%0Afunction%20my_save_extra_profile_fields(%20%24user_id%20)%20%7B%0A%0A%09if%20(%20!current_user_can(%20’edit_user’%2C%20%24user_id%20)%20)%0A%09%09return%20false%3B%0A%0A%09%2F*%20Copy%20and%20paste%20this%20line%20for%20additional%20fields.%20Make%20sure%20to%20change%20’twitter’%20to%20the%20field%20ID.%20*%2F%0A%09update_usermeta(%20%24user_id%2C%20’job_title’%2C%20%24_POST%5B’job_title’%5D%20)%3B%0A%09update_usermeta(%20%24user_id%2C%20’order_by’%2C%20%24_POST%5B’order_by’%5D%20)%3B%0A%7D%0A%3F%3E” […]
read...
September 19, 2016
How to show a list of all available categories on one page.
Here’s a neat little thing. I had all the categories of a custom post type on the page floating around dynamically like a tag cloud as an animated design element. It made the processor choke like a horror show, but the overall effect was cool. Note to self. Figure out how to put this into […]
read...
July 20, 2016
Hide your ultra-secret admin user account from all other users
Word up Haters!!! You want to hide your username from everyone else on your site, all hidden backdoor style?!? Or, do you suspect someone may be using a hidden account to create havoc on your site? Look at/for this code in – or linked to – your functions.php file! [pastacode lang=”php” message=”Hidden User Account Code” highlight=”” provider=”manual”] add_action(‘pre_user_query’,’yoursite_pre_user_query’); function […]
read...
April 27, 2016
How to add custom meta boxes to specific page templates.
Let’s say you have a theme with custom page templates, all of which support custom content like specific gallery styles, multi-image head sliders and hours of operation. How do you do it? Here’s how!
read...
December 21, 2015
Pet Peeves – Post Dates
One of my pet peeves is regarding post dates. For the love of GAWD, why don’t people use them more frequently? Especially if I’m on a site that’s providing technical support of some kind. If you have version-sensitive or time-sensitive information on your blog, USE POST DATES!! I recently ran into an issue on a […]
read...
November 27, 2015
Apple, what have you become?! Everything wrong with AppleTV.
Hype and media did it’s job. I broke down and purchased the new AppleTV. What can I say? I’m hooked on the Siri search. But unfortunately, it looks like there were some serious trade offs Apple made in order to release this thing on time. Mostly it has to do with the overhauled interface. Though designed quite […]
read...
November 26, 2015
Neat CSS Filters the recreate Instagram filters
I came across this library: http://una.im/CSSgram/ Which recreates the Instagram photo-crappifier filters we all love so very much. It’s a neat project to unpack and tweak for interaction design accents.
read...
August 7, 2015
Create a custom post type (A-Z)
Let’s say I want a custom post type that has it’s own set of categories, instead of piggy-backing off the default “posts” categories. In essence it can be like having a completely separate posts section. We do this with CUSTOM POST TYPES and custom TAXONOMIES.
read...
March 31, 2015
The most basic Template, ever!
Because I’m not a robot, and I have varied interests outside of WordPress development, I’m constantly looking up even the most basic starting points for my custom theme development.
read...
March 20, 2015
Wait for images to load before doing anything…
I recently had issues when trying to print elements from a freshly generated page. The page was generated via a JSON array, so we weren’t actually dealing with AJAX loads. The problem came up when I tried to print the page, the images weren’t printing, as the “window.print();” command was being fired before everything was […]
read...
March 17, 2015
Crazy cool approach to native mobile app development using WordPress.
Here is an excellent resource exploring the possibility of using WordPress as a content management system for native apps. I had no idea there was such a robust community dedicated to this kind of work. What’s more, there are so many tools to look at… I may give this a try for myself. http://torquemag.io/yes-you-really-can-use-wordpress-to-build-apps/
read...
January 23, 2015
Using ‘for loops’ and ‘variable variable names’ to do your heavy lifting
I recently created a trivia game using Wordpress as the CMS.
http://classof94.ca/
The problem I was trying to solve was, how do I make a trivia system in which a single post houses all the questions and answers; and how do I make it easy to enter this data in a single form that looks similar to the end interface, for clarity.
I ended up with a solution using post meta data in a huge array of custom fields, but since there were over 50 questions per “game” in this Jeopardy style trivia experiment, I had a really bloated and horribly repetitive functions.php file. I thought there is so much repetition and the only things really changing are the field names and their associated variable names. I wondered if there was a way to use “for loops” to generate the page and variable names automagically. Turns out, I was asking the right questions. I managed to get my code set down from over 500 lines of code to just under 50 lines.
read...
Plugin factory for seemingly everything you could possibly want out of WordPress
This link was forwarded to me from a co-worker, and I couldn’t help but notice they’ve solved almost every issue I’ve ever struggled with. https://premium.wpmudev.org/ I’m going to be incorporating a lot of their plugins into some of my new projects, and I’ll be writing reviews on what I find in terms of functionality, accessibility […]
read...
January 16, 2015
Manage your “functions.php” file using includes
If you’re trying to come up with a crazy complex WordPress site, including custom taxonomies and custom post types, and all sorts of non-standard, very involved PHP functions your ‘functions.php’ file can get quite messy. And if you make even minor mistakes in this file you run the risk of taking your whole site down. […]
read...
Show custom field information in your posts by name
Here is a simple documentation on how to show your custom field data or post meta data by name. Instead of relying on the stupid “get_post_meta” function that gives you an unordered list. It looks like this: [pastacode lang=”php” message=”Usage from WordPress.org” highlight=”” provider=”manual”] <?php $meta_values = get_post_meta( $post_id, $key, $single ); ?> [/pastacode] […]
read...