I had a situation recently where I needed to have a WordPress permalink redirect clients if they were an “authorized” IP address. Everyone else would get a 404. An example of this would be if you had a super long URL that you wanted to keep private, but wanted an easy-to-remember URL to access it. You should be able to access it from home, but everyone else would see a 404. A quick way to remember a URL without sacrificing security. Here’s how I did it. Add the following to functions.php for your site’s theme. It breaks down to: if the page being requested is ID 100, and your client’s IP matches the dynamic DNS hostname IP in $ip, then you’ll get redirected [Read More…]
I always install Apache and PHP on my Raspberry Pi’s so that I can write and deploy small web applications. Once they’re setup, they’re good to go. There are times where I’ll get a new Raspberry Pi and/or have to reformat mine (typically because of boredom). This usually involves me having to remember how to install Apache, PHP, MySQL and phpMyAdmin from scratch. So I’m throwing together this small tutorial so that I can remember how to do this in the future. Hopefully it helps you out, too. First we want to make sure our hostname is correct on the Raspberry Pi. If it matches what you want it to match, then you’re good to go. If not, you’ll need to update [Read More…]
I wanted to post this quick tip on how to access an external database, or an external table, from within WordPress. This is mostly here for my reference in case I need it in the future. Hopefully it helps you out, too. I have a table that’s external to my primary WordPress installation that I needed to get some information out of. In my functions.php, I added this piece of code into a function I already had, and it worked great. It’s a simple bit of code that just counts the number of entries in the “data” table. This snippet uses the the database login and password information from your wp-config.php. If you need to specify different login information, just change the DB_USER and DB_PASSWORD to [Read More…]
New project for pvcustomhomes.net has launched! PVCustomHomes.net is the website of Pioneer Valley Custom Homes, builders of custom homes in the Pioneer Valley in Massachusetts. They offer consulting on new projects, design and architectural work as well as building the project to completion! The website was built on the Genesis Framework for WordPress and features an image slider, portfolio and a timelapse video of one of their builds! If you’re in MA, and looking to build a new home, get in touch with Pioneer Valley Custom Homes!
My wife and I are in the process of building our house. I knew from the beginning that I wanted to timelapse the build. The idea of making a video of “5 months in 2 minutes” is really interesting to me. So I got myself an off-the-shelf construction timelapse camera. Tested it out, and the quality was disappointing. I suppose being a wedding photographer I demanded more from a photography project. So I did what any tech nerd photographer would do — I built my own timelapse rig! Except this time I one-upped it and added solar power on a timer, with a wireless AP and 4G LTE modem. This allows for instant uploads to my computer. This post is my attempt at documenting [Read More…]