Category Archives: Tutorial

#ThemeWeekend

June 30th and July 1st 2012 is the first ever Vancouver WordPress Theme Weekend. I’m part of the organizing team and I’m giving a quick intro to Github, which is where we’ll be hosting all of the teams’ themes. You can check out the slides of the GitHub intro below or download them as a PDF.

Please check out all details for the event at wpyvr.org/theme-weekend

Always logged in, using mu-plugins

I’ve decided to start posting handy/helpful code snippets here [Idea/inspiration from Bill Erickson].

So here’s my fist snippet! It allows you to remain always logged in when developing sites (Warning: do not use this on a production site!)

I like to put this code in the special mu-plugins folder that way it always runs. We hook into ‘admin_init’ and ‘init’ function, check if we’re logged in, and if not, logs us in. Change the 1 in the get_userdata() function to match the user ID that you want.

Again, don’t use this on a production or even staging site. It’s only meant to be used in a local environment, where you are the sole developer/user of the site (since it always logs into the same user). Use it with caution, you’ve been warned!