All Blog Posts

Custom template for custom post type single post wordpress

Posted on January 22, 2017 in Web Dev

I recently had a somewhat unique situation whereby I needed a custom template per post of a custom post type. Consider the custom post type being ‘services’, then you’d set it like this: The URL structure follows something like: /services/web-development /services/consulting /services/cooking …and so on. In this example, I was looking to have a drastically different…

WordPress AJAX tutorial – how to use AJAX in a WordPress theme or template

Posted on June 19, 2016 in Web Dev

Edit: the output of this tutorial can be seen with the ‘agree’ and ‘disagree’ buttons here: http://www.youthenme.com/sites/review/ I’m fairly experienced with using AJAX and its various jQuery shorthand implementations, but having never implemented AJAX into a WordPress theme I’ve had to do quite a bit of Googling. I’m writing this post to show how I’ve implemented AJAX into…

UIDB.io Priorities for June 2016

Posted on June 11, 2016 in Projects, Startups

10/06/2016 Note: I originally wrote this post for myself as a Google Doc with no intention of publishing it on my own blog. However, I’ve decided to put it on here so I can openly receive feedback and tell people my plans… A word of warning: not much effort has been put into editing this post…

WordPress Fatal error: Call to undefined function get_header() [fix]

Posted on July 6, 2015 in Web Dev

This problem seemed to come out of nowhere and was driving me crazy for at least 15 minutes. This is the error message I was getting (I have redacted and edited a few directories of this for privacy): Fatal error: Call to undefined function get_header() in /link/to/wordpress/install/public_html/wordpress_root/index.php on line 17 The problem was occuring on a pretty…

WordPress custom post type file not found 404

Posted on June 8, 2015 in Web Dev

This bothered me for way too long before actually discovering the solution. The solution is written there in plain English within the register_post_type array, yet I didn’t think to fiddle with it. The problem was regardless of permalinks settings, my single custom post type would always 404. It didn’t matter if I used the default…

How to seed a database in Laravel 5 (without the “[ReflectionException] Class ____ does not exist” error)

Posted on February 24, 2015 in Web Dev

Database seeding in Laravel is pretty awesome. It had me pondering recently what the best practice is for seeding a database with an admin user (or users). During my development I run into a slight issue. I felt like the Laravel docs didn’t fully explain the process, so I’m going to show you my solution…

Laravel 5 Entrust (Zizaco) error “Class ‘Role’ not found”

Posted on February 24, 2015 in Web Dev

I was having this problem for a good 30 mins until it finally hit me. Something glaringly obvious to any seasoned Laravel dev, or anyone with more than a few weeks experience in Laravel 5 for that matter, but a fairly easy thing to miss for a newbie to the L5 way of doing things. I was…

Implementing a ‘hottest’ algorithm in Laravel like that of Reddit / Hacker News

Posted on February 4, 2015 in Web Design

I’m building a directory of internet marketing products at the moment called imrepo.com. It’s a project for me to learn more complex Laravel stuff and toy around with ranking algorithms, though I think there’s actually some serious money to be made if the idea is executed well. I had a slight dilemma in that I…

jQuery clone inputs and selects not working

Posted on November 24, 2014 in Web Dev

Use clone(true) to attach handlers to all new inputs. Kinda like updating the DOM.   If you don’t do this, your cloned selectors won’t have any JS handlers attached to them and will for all intents and purposes not be contained within the DOM.

Redirect non-www to www on Nginx server (+WordPress)

Posted on September 6, 2014 in Web Dev

Implementing a sitewide 301 isn’t particularly difficult. However, I kept hitting a redirect loop and just couldn’t figure out why. The problem was the URL as defined by WordPress was the non-www version, and not my desired www version. So, basically the server was redirecting from non-www to www, and then WordPress’ redirect was going…

SendGrid “Fatal error: Call to undefined function curl_init()” on DigitalOcean VPS

Posted on September 6, 2014 in Web Dev

This is another “dur” moment, but it’s worth jotting down for anyone else to find after they have the issue. Though, I’m not sure anyone else would have missed such an obvious problem! So as soon as I installed SendGrid on to my Digital Ocean VPS, all the backend stopped working. I changed over to WP_DEBUG=TRUE…

Google testing out email composition from within search results!?

Posted on September 3, 2014 in SEO

This is really strange. I was Googling around testing out some stuff, and noticed that a “compose email” area showed up for one of my queries. This was right within the search results page. Strange! This is what it looked like:   I tried to send an email, but it bugged out and I got the…

Linux server setup: from powering on to deployment

Posted on August 24, 2014 in Web Dev

This post is more for my own use than anything else. These are common snippets I use that I’ve jotted down to jog my memory whenever I need them. Install Git: Source: http://git-scm.com/book/en/Getting-Started-Installing-Git rsync the SSH key to computer We need to make sure the VPS is trusted from the git repo (Bitbucket, Github, etc)….

How to Clear/Reset Woocommerce Layered Nav Widget Filters

Posted on August 20, 2014 in Web Dev

The filtering widget provided by Woocommerce is genuinely very impressive. It works perfectly, but lacks one very important feature – you can’t clear the filters as standard. After a quick Google (I do this before rolling any solution on my own!) I found this excellent and concise post. The post answers the question, but I…

How to get Google Apps email working with Mac Mail when emails won’t send

Posted on August 13, 2014 in Web Dev

I set up Google apps email with my Mac Mail client. It worked fine until I tried to send email from within the client. I couldn’t find too much info about it online, and went a couple of months sending (annoyingly) from the gmail web interface. This was annoying, so thought I’d finally go about…

Turning large long-term goals into bitesize chunks for NOW

Posted on July 6, 2014 in Personal development

Just had a super long drive around one of the most expensive areas of Cardiff basically to perve at the beautiful houses there. Did it entirely for motivation (workspiration?). It’s really awesome to think that there’s _some_ path that I could take, starting today, that would ultimately lead to me living in one of those…

CodeKit for Mac not auto-compiling Compass upon file change

Posted on June 17, 2014 in Web Dev

After purchasing and upgrading from CodeKit 1 to CodeKit 2, I noticed that my SCSS files were not automatically compiling upon file change. I tried absolutely everything, and simply could not get it to work after hours of debugging. This is one of my favourite features of Compass, and I love the simplicity that CodeKit…

How to set up virtual hosts on MAMP

Posted on May 26, 2014 in Web Dev

This is something I found myself Googling every time I needed it. That was until I actually just sat down and  thought about what it was I was doing when I needed to set up a new local virtual host. This really isn’t difficult at all, but there are some file paths that need remembering….

GoDaddy’s Knowledge Graph Playing Up

Posted on April 22, 2014 in SEO

I just Google’d “GoDaddy” to check on one of my domains (FYI my usual registrar is Namecheap, despite not personally having any issues in the past with GoDaddy, but this is an odd domain out) and noticed that their Google knowledge graph stuff was looking a bit odd:   It looks like some form of…

How to add an attribute from a model query in laravel

Posted on March 3, 2014 in Web Dev

So I’m still very much into learning Laravel. One project I’m building at the moment is imrepo.com, which when you strip it down to the basics, is basically just a directory of ‘things’ – not the most complex project ever, but I’m still finding that I’m learning a lot along the way. I got around to…

Officially a Themeforest.net Author!

Posted on October 21, 2013 in Projects, Startups, Web Design, Web Dev

Ok that sounds much cooler than what is actually is. I’ve had my first theme accepted onto Themeforest! It’s for the Ghost blogging platform, and is called MeSquared. Yours to buy for only $16.00 🙂 It was made a a little bit of a hurry in order to be a winner in Themeforest’s “Most wanted” competition. The first…

Multiple login with Skype on Mac

Posted on August 31, 2013 in Web Dev

Need to login to more than one Skype account at the same time? It’s pretty easy! Here’s how: Step 1 Open a Terminal window Step 2 Type in: Step 3 Type in:   – Good luck!

Clever ways to get web design examples and inspiration

Posted on August 31, 2013 in Startups, Web Design

All web designers/developers check out other websites for inspiration at some point in their design process. You can find what you’re after in a number of different ways: Well known ways Look at sites that stick out in your mind. For me this includes sites like AirBnB, Harvest, Ballpark, etc. Search for ‘top x’ lists….

Paypal IPN sandbox returning INVALID

Posted on August 8, 2013 in Web Dev

This is an issue that is very easily overlooked. Paypal have to have some credit here in that they basically give you all the code required to get the IPN up and running properly – and, apart from the issue I’m going to tell you about next, it really does work straight out of the…

SendGrid email won’t send from 1and1 shared hosting?

Posted on August 7, 2013 in Web Design

Another quick lesson I’ve learned with the creation of http://www.ineedthatmug.com is that 1and1 blocks port 587. I’m using SendGrid.com for transactional email delivery (at the moment this is only being used on the contact form, but soon it’ll also be implemented into purchases). SendGrid are kind enough to recommend a number of different ports for…

Some Laravel “Gotcha’s” – Things to take note of when starting out with Laravel

Posted on August 4, 2013 in Web Dev

I am not a Laravel expert. I am writing this blog post as a Laravel amateur. My goal with this is to point other newbies in the right direction with some seemingly common and easily avoided Laravel mistakes. I’ve only been using it for about a week, but I can’t help but think that if I…

Some .NET snippets that I need to remember

Posted on June 18, 2013 in Web Dev

So I’m developing some front-end stuff in using .NET. Coming from a PHP, I find some of the conventions and features of .NET to be quite confusing. I’m going to update this post with some snippets I’ll likely need to use in the future: How to easily evaluate data from controller in a view Controller…

How to fix overscan (black margin around monitor) with a quick registry hack

Posted on May 28, 2013 in Computers

I use a 15″ 2011 Macbook Pro (the lower res version) to do all my design and development. Recently I finally gave in and bought a second monitor (I went for an entry-level 24″ LG) and I couldn’t be happier with my massively increased work area, and as a result, increased workrate. That was until…

How to remove index.php from Codeigniter URLs

Posted on May 26, 2013 in Web Dev

Codeigniter is an awesome PHP framework that makes PHP development much simpler, and much much faster. I’ve only been getting to grips with it for a few days, but have noticed there are some quirks that come packaged that you’re going to want to get rid of. One of these is the fact that ‘index.php’…

How to create a repeating object in Illustrator

Posted on March 6, 2013 in Web Design

This method is going to save me a tonne of time and stop me from having to copy/paste an object just to replicate a look. My problem was that I needed to create a listings type wireframe in Illustrator. I would create a single listing, and then to create the desired effect I would simply…

Creating FAOgocompare.com [update: interview]

Posted on February 28, 2013 in Projects, Uncategorized

So I decided I would like to try and target Gocompare and hopefully get a job offer from them. I also decided exactly how to go about doing this. I created faogocompare.com – my attempt to grab Gocompare’s attention. The entire development process took roughly 6 solid hours, from idea, to domain purchase, to the…

PPC Project [implementation] – carpentryhq.com

Posted on January 29, 2013 in Projects

This post is a continuation of this post. Bought domain from namecheap. carpentryhq.com – I quite like the domain (even though I’m not interested in carpentry even in the slightest!). Surprised it’s available! Transferred DNS to 1and1 hosting account. Cloned local repo for /carpentryhq/ from Github account. Created /carpentryhq/ directory in 1and1 FTP. Bonus: While…

My first Adwords PPC project [thoughts]

Posted on January 29, 2013 in Projects

Looking for a mini project to create to practice PPC skills (and hopefully make money with). There’s so many choices to make! Which broad category should I target? Which niche? Which audience? Is there much competition? Is there a market? Are there products to sell? Is PPC cheap? I could literally spend days searching, so…

Getting a Job at Gocompare. Some Thoughts

Posted on January 25, 2013 in Career, Projects

Update at bottom of post I can’t find any obvious employment/careers/jobs links on the Gocompare website. Maybe I’m missing something? (or maybe they’re just not hiring?) So, I guess I need to get their attention in some creative way. If there isn’t a job, then maybe I can show that I can add value and…

I’m going to Gocompare some jobs…

Posted on January 25, 2013 in Career

In four and a half months and I’ll have officially left uni forever and I’ll be on the prowl for a job. The jobs market isn’t the best at the moment. However, the industry I’m looking to enter as a whole is expanding quite nicely, so in that sense I count myself lucky. Finding a…