I’m back and happy to announce a new WordPress theme that I have created called Minimalist which you can see on this blog. Why? Because almost all WordPress themes focus on nice design and flexibility while killing performance. It looks great on the cover but then you dig in and see a lot of garbage in the source code, ridiculous amounts of database calls, a large amount of files, and plugins needed for simple stuff. Most of it is not needed.
Minimalist is simple, fast, responsive, and SEO optimized WordPress theme that can be used out of the box or as a great starting point for WP theme development. I only tweaked a few things and applied it on this blog.
When I think about HTTP2, I think about web performance and page load times. There is a lot more to HTTP2 like server push but I am very curious about the impact on website speed. How do the webperf metrics change when a page is delivered with HTTP2 instead of HTTP1? Let’s check out a waterfall comparison via WebPageTest: Read more
If you are using WordPress and the Gravity Forms plugin, you might want to allow users to edit their posts or entries on the front-end. This is not supported by the plugin but there are other plugins or addons like Gravity Forms Edit Entries, Gravity Forms Sticky List, Gravity Forms: Post Updates, and GravityView that provide such functionality. But, they also come with other features that you might not want or need and installing more and more plugins can certainly impact performance. Moreover, a few of the plugins that I have tried would create and delete entries in GravityFroms causing missing Entry IDs which isn’t ideal and it is additional work on the system. Today, I will show you how to edit Gravity Forms entries on a page by simply using GF actions, hooks, and the API. Read more
I have been a big fan of Google App Scripts. This service allows you to build powerful scripts that can be scheduled and integrated with Google (email, Google Docs, Excel) and external APIs. You write in JavaScript, within a browser based code editor right in Google Drive and the script can even be published as a web app. The quotas or limits are pretty good so you can quickly build something powerful for free.
Today, I will show how to create an Image Proxy with Google App Scripts which would allow you to grab images from other domains or go around the browser’s same-origin policy. Basically, the Google App Script is a server side proxy for your client side request. So, if you are exporting SVG as an image with images hosted on another domain or saving HTML5 Canvas with toDataURL() method, this could help you avoid tainted canvas and browser security errors. But, really, it’s just a simple example of a Google App Script published as a web app. Read more
How do you pin photos on Pinterest automatically? I have covered some elements of the Pinterest API before, but I did not expose the endpoints necessary to pin via the API. None of that is yet publicly available but it got me thinking about doing more programmatically on Pinterest in general. What would it take to automate the process of pinning an image automatically? I think a simple solution is to use a headless browser and recreate the steps to make that happen. Lets go over a simple script that will login into Pinterest, retrieve an image from an external source, add pin it to a board with a pin description. Read more
I was recently playing around with dat.gui and the cool FizzyText animation made me consider the concept of exporting HTML5 Canvas to video. I have previously covered canvas to video conversion but it was specific to making a photo slideshow. Today, I want to create a simple script in JavaScript that will grab any CANVAS element, on any website, retrieve the image frames, and compile them into a video file. Read more
As more APIs allow CORS, we can create some really cool integrations without any server side code. Google Maps API is an obvious one but I was surprised to see successful Ajax calls to the FaceBook Graph API which made me think about building and integrating these services. I was scraping FaceBook for Places, or geo locations, so it only makes sense to start with a world map where you can search, click, or drag markers to retrieve any latitude and longitude coordinates for your geo search.
Next, these geo coords are sent to my facebook function that initiates a graph search for places near the provided geo location. The response drops markers on the Google Map, similar to Google’s own Places API and examples. But, I also wanted to visualize this dataset in more details and used the jQuery DataTables plugin to make the API data available for easy viewing, searching, and filtering. You can get more data for a specific place by clicking on an id, which initiates another place API call and drops the JSON response in a modal window with code highlighting.
Here is a list of the top jQuery plugins for alerts and messages and the best JavaScript notification libraries. Some are enhancements to console log messages or alert messages and some are full JS notification systems. There are many options: you have plain JS solutions, jQuery alert plugins, BootStrap versions, alert modules for Angular, BackBone alert systems, and other notification frameworks for ReactJS, Meteor, UI Kits, etc. Here are the top 50 alerts and notification libraries with a some organization: Read more
Dragging or resizing elements or divs on the screen is a pretty popular feature of modern user interfaces. It’s pretty awesome that there is a resize property in CSS3 and drag and drop in HTML5. However, both are pretty limited, and modern designs for such functions require JavaScript solutions. Many end up implementing Resizable and Draggable from jQuery UI (example) but that library is really bloated and today I will cover some jQuery UI alternatives to resizing and dragging elements on the page. Read more
How do you upload files to WordPress with Ajax? Maybe you want fileupload functionality on the front end or enable file uploads in your WordPress plugin. There are a lot of good tutorials on this subject but I couldn’t find any simple example that works with native WP files.
This tutorial on multiple file uploads on the front-end does work but it requires using a server side file for the back end and custom functions in functions.php that use media_handle_upload without Ajax. Tutorials on WordPress file uploads with ajax leverage special jQuery plugins, queuing wordpress scripts, and server side functions to process the Ajax request. This might be needed if you need a lot of control but if you just need to easily upload and delete files, I will show you how to do it in a few lines of simple vanilla JavaScript. Read more