Advanced WordPress Hooks

wordpress hooks

When I develop WordPress Plugins or WordPress Themes, I like to always consider organization and efficiency. Organization comes in many forms. In this article, I’d like to discuss hook organization.

There are times where you might not want an event to occur until another event has occurred; Or maybe you want to have an event conditionally occur before or after another event has occurred.

Continue reading “Advanced WordPress Hooks”

Dynamic Offsets with Bootstrap Affix

Bootstrap or Bootstrap Affix

I was working on a Bootstrap project, which had a vertical accordion menu as a means of navigation. I had it set to keep each menu opened, unless clicked again. Where as a typical accordion menu would close all other menus, except the one recently clicked / opened.

At the very bottom of the accordion menu, I had another block. This was the affixed item. On initial page load, as you scrolled down, the block would automatically affix properly and follow you as you continue to scroll down the page (as expected).

The problem was, what if the user had previously opened one or multiple accordion menus above? This has now adjusted the overall height of the page. Now when you scroll down, the affixed item beneath the accordion menu would now start to affix “prematurely”, causing it to overlap the menu unexpectedly. This is due to the top offset assigned to the item on initial page load.

The affixed item was assigned a top offset on initial page load. The height of the page is adjusted post page load. That means, top offset from the initial page load is no longer valid.

Upon doing some research, I’ve figured out a solution that meets my needs specifically. I’ve tested it several times on large and medium screen sizes. This item isn’t affixed on small or extra small screen sizes.

Continue reading “Dynamic Offsets with Bootstrap Affix”

Image Quality Control With Uploaded Images in WordPress

WordPress Image Quality

Controlling the quality of your uploaded image files in WordPress might be something to consider. By default, WordPress doesn’t upload images with 100% image quality. If you want higher quality images or lower image quality, then consider adding this snippet of code to a plugin file or your currently active WordPress theme’s functions.php file.

This is going to be a short post. Mainly just a quick snippet of code. If you’re a developer or feel savvy enough to dive into hooks, this is a quick and useful snippet of code.

Continue reading “Image Quality Control With Uploaded Images in WordPress”

Amazon AWS Route 53 and Custom Nameservers or White Label Servers

Amazon AWS Route 53 and Custom Nameservers

I was previously running my own DNS servers and operating my own custom DNS failover solution. I decided to make a switch to Amazon’s AWS Route 53 service, in hopes to provide better network reliability.  Let me tell you, Route 53 is awesome. Completely worth it. Improved network reliability and faster DNS lookups.

Continue reading “Amazon AWS Route 53 and Custom Nameservers or White Label Servers”