Categories
WordPress Defaults

Correct Way To Create WordPress Theme Frontpage Templates

People can make several versions of the exact same front page and for them to be accessible at several different of URLs.

Not good for Theme users, Site Visitors or for SEO

Making a page template (with a file containing an opening comment something like: Template Name: Front Page) coded specifically for use as the frontpage is the wrong way to do it. People can make several versions of the exact same front page and for them to be accessible at several different of URLs. Not good.

WordPress has specially designated templates for use as the front page and as the blog page. They are front-page.php and home.php respectively. If these templates are in place and static page is defined then they will be used automatically.

Categories
Uncategorized

Varnish CDN

A while ago I wrote about an idea I’d had to make use of the Varnish forward caching proxy as a CDN. As it happens I’m not the only one who’s had the idea. There are companies offering Varnish as a CDN in SaaS (or IaaS) form out there but the prices I seen for the minimum offerings were definitely above the average WordPress site’s CDN requirements and budget.

If other companies are using a similar system and charging for it then it seems like the idea is a good one. As it happens it’s not all that hard to implement. In fact this very site is using Varnish as a CDN right now (inspect the page and look at one of the static resources in the network tab and you should see some Varnish Headers).

A bit of testing testing and configuration and 2 hours later it was ready to be put in production. A single DNS change to point it towards the Varnish Server and it was live.

Categories
Uncategorized

Programmers Effieciency

The efficiency that a programmer demonstrates in their code could be misconstrued in the real world as laziness.

As a programmer one of the things that we try to do is solve problems or perform a task in the most efficient way possible. In computing terms efficiency generally bogs down to doing it in less code or doing it with less CPU cycles.

Knowing how programmer efficiency could be perceived by other people I tend not to point out the basic though process I go through whenever my wife asks me to do something. It’s best if that never gets declared globaly lol.

“What’s the quickest way possible to get this done?”, “Do I need to do all of these steps or are some unnecessary?” or

  • “Would looping small sections of tasks instead of doing it one big block be better?”
  • It’s not lazyness it’s efficiency… at least that’s what I tell myself in my head.