php Archives - Jeff Everhart

Get Pages Using a Specific Page Template in WordPress

In a recent project, I had the need to get an array of all of the pages on a site that were using a particular page template. It turns out that this is really just an extension of any other type of meta query I could run, but you need to know that the meta […]

Read More

Fixing PHP Warning: mysqli_real_connect(): (HY000/2002): with WP CLI and MAMP

This will be a short post, but I felt it necessary to do since I had to deal with this is a non-standard way given my situation. I decided to play around with WP CLI to scaffold out the theme for a project that we are starting, but ran into a few configuration issues. It […]

Read More

Debugging WordPress PHP with VS Code and MAMP

This is the blog post I wish existed a few weeks ago when I started trying to configure Visual Studio Code to debug PHP and WordPress interactively. Although this setup might not work for everyone depending on your environment, it will save anyone using MAMP already a hell of a lot of time. The Benefits […]

Read More

Automate Deployments with GitHub Webhooks

This post is the second post in my new fangled Weekly Workflows section. I took a few requests on Twitter as to what people would like to see here, and Paul Williams, a developer from Texas, expressed some interest in how people use GitHub and workflows around that key technology. As luck would have it, […]

Read More

Adding Custom Fields to WordPress JSON API

I’m working on building out some cool annotations tools for different types of audio, mostly music, which you can see an example of here. Although this is a good step, to really make this app/plugin/tool extensible and reusable, there needs to be some sort of back end layer to store some meta data about each […]

Read More