Coding

Tips and Tutorials for Laravel, WordPress, VueJS, React, and straight PHP. Learn how to make web apps using Laravel, themes, and plugins with WordPress and front-end components using VueJS.

Coding · 1 MIN READ

Use PHP to Retrieve All Links on a Page

I was developing a project recently, where I had the need to get all the links on a certain page. I first turned to a JavaScript library, like Jasmine. I really wanted to do this within my PHP code, so I ended up going with this solution: $html = file_get_contents(‘http://www.example.com’); $dom = new DOMDocument(); @$dom->loadHTML($html); […]

Coding · 2 MIN READ

Delete WordPress Sample Content Automatically

WordPress ships with 2 pieces of sample content. The Sample Page and a Sample Post content have been part of the WordPress base install for years. I wish WordPress gave an option to install WordPress without sample content, but as far as I know that’s not on the feature map. There may be times when […]

Coding · 1 MIN READ

Track Number of Visits to WordPress Pages and Posts

Almost everyone who has a WordPress site/blog, uses Google Analytics. This great tracking tool gives you insight into your visitors that traditional marketers would only dream of. Sometimes you want to do some things that Google Analytics is not a right fit for. You may want to track which pages or posts are the most […]

Coding · 4 MIN READ

WordPress is Not an App Platform

WordPress has come a long way since it’s inception. I really got excited about WordPress after the platform started allowing developers to register their own Custom Post Types. I was a big fan of this, and believed this could bring the type of data abstraction that was needed for modern websites.

Coding · 1 MIN READ

setInterval is Bad

I got another reminder today of how bad setInterval can be. You just don’t hear developers talking about the problems with setInterval. In fact, I’ve seen numerous tutorials where good developers are using it in their examples. We need to start addressing this and start talking about the problems with setInterval.

Coding · 2 MIN READ

Upload Files to AWS S3 using Laravel

Update: Freek Van der Herten has an updated version of this tutorial, which is better on memorey and supports larger file uploads. Uploading to Amazon S3 can be a great way to keep your files loading quickly with their CDN, and allow you to work more on your code, rather than your filesystem. Laravel 5’s […]