Web Dev

Inserting a PSD into another PSD File

For the longest time I’ve been waiting for the ability to insert a Photoshop file into another Photoshop file. I think the capability has actually been around for quite some time, but up until recently I was using an older version of Photoshop, mainly out of protest of the subscription fee business plan that Adobe […]

Read More

Logo List Functionality

Creates a list of image logos, ideally spaced and responsive. Image Examples Image example Including the File (WordPress) require_once(get_template_directory().”/saphire-blocks/logo-list/logo-list.php”); Using the Function <?php $data[‘Title’] = “Section Title Here”; $data[‘Image’][0][‘Image’] = “image-path.jpg”; $data[‘Image’][0][‘ImageTarget’] = “some-website.com”; $data[‘Image’][0][‘ImageAltText’] = “Image Alternate Text”; $data[‘Image’][1][‘Image’] = “image-path.jpg”; $data[‘Image’][1][‘ImageTarget’] = “some-website.com”; $data[‘Image’][1][‘ImageAltText’] = “Image Alternate Text”; Saphire_LogoList($data); ?> Settings $data[‘BackgroundColor’] Adds […]

Read More

Standard Section Functionality

This functionality simplifies the process of creating a “standard section” on a website (it can also be used to create a hero section), where there is a block of text and an image. The image can aligned to the left, right, or bottom, and this has many additional features to make creating pages easier. The […]

Read More

On-Page SEO Checklist

Content is of high quality, aim for main content to be at least 500 words Keywords included in page title (meta title tag) Keywords located in page url Keywords included in page headline (h1 tag) Keywords included in at least one h2 tag Keywords repeated 3-6 times within the body text All images have alt […]

Read More

Reference a Variable Outside of a Handlebars Each Loop

Once within an Handlebars each loop, you can no longer just reference a variable that is outside the loop.  In the example below, the first ‘ParentVariable’ will render correctly, but the one within the “each” loop won’t.  {{ParentVariable}} {{#each Users}} {{ParentVariable}} {{/each}} To use the variable within the “each” block, you’ll need to add a […]

Read More

Chrome displays a different height than what Chrome says the height should be.

This took me quite a while to track down, which is unfortunate since I know I’ve ran into this several times.  Basically I was changing the height of an element, but no matter where I specified the height, it wasn’t displaying what I was putting in — even if I stuck a style attribute right […]

Read More

Google Analytics Sucks

Yeah, it’s a little blunt and harsh, but over the years I’ve been growing more and more disatisfied with the tool. A long while ago, I created my own little website visitor tracking tool, which I have slowly been dusting off. Eventually I may completely remove Google from my websites and opt for my own […]

Read More

Removing the Horizontal Margins on a Google Chart Graph

I seem to be able to successfully modify quite a bit with google charts, but I couldn’t find a good way to remove the horizontal padding to the left and right of a google graph.  From what I can find, there really isn’t a good way to do it.  I thought I was close with […]

Read More

PHP JSON Returned As Object Instead of Array

I was returning, what I thought was an array from PHP, but it kept returning it as a json object, so I had something like: $listItem[0][0] = “Jan 1”; $listItem[0][1] = 100; $listItem[1][0] = “Jan 2”; $listItem[1][1] = 120; $listItem[2][0] = “Jan 2”; $listItem[2][1] = 120; …etc… This would return in javascript those an array, […]

Read More

My Emerging CSS System

I’ve been thinking about javascript, sass, css, and the DRY (Don’t Repeat Yourself) principle a bit too much today. It’s partly due to working on a new code base, which makes it easy to point out what I would do differently, but also makes me re-examine my own code, or standards that are out there […]

Read More