WordPress Twenty Sixteen Search Widget Slider

Twenty Sixteen Search Widget Slider

I really like WordPress’ Twenty Sixteen default theme. It’s clean, well-designed, and versatile. With a child theme based on Twenty Sixteen, customizations are easily accomplished. I’ve used it as the basis for several sites. There is one thing I like to change.

Most sites need a Search widget. The logical place to put a Search widget on a Twenty Sixteen site is at the top of the Sidebar widget position. However, on mobile devices, all the widgets in the Sidebar position, including the Search widget, are inconveniently moved below the main content. That’s actually a good thing for a blog; it’s best to have the freshest content up top. It’s not so good for a site whose visitors rely heavily on search results to navigate the site.

Continue reading “WordPress Twenty Sixteen Search Widget Slider”

Tax Exempt Customers for Woocommerce

Tax Exempt

I recently had a client who uses WordPress and Woocommerce for his e-commerce site ask me to come up with a method of making some customers tax exempt. He primarily sells to retail customers, but he has a number of resellers who use the site. The resellers should not pay sales tax, even though they reside in a state which does charge sales tax for retail customers.

I found some information on Woocommerce’s site which recommended extending the capabilities for the “customer” user role and adding an action to set the value of “set_is_vat_exempt” into the child theme’s functions.php in order to make some customers tax exempt. Unfortunately, the code snippet, which as of this writing hadn’t been updated since 2013, didn’t work, throwing a fatal PHP error on the test site and taking the entire site down.

Although, in the end, the fix was simple, it took a while for me to come up with a working solution, so I’d like to share it here, hopefully saving someone else the time and trouble of setting up tax exempt customers in Woocommerce. I’ve tested this approach using WordPress 4.9.6 and Woocommerce 3.4.2.

Continue reading “Tax Exempt Customers for Woocommerce”

Is Upgrading A Linux System To An SSD Worthwhile?

Samsung 860 Series SSD

I’ve seen a number of reviews of solid state drives (SSD) versus hard disk drives (HDD) that show substantial benefits with SSDs for boot time, program startup time, and file transfer time, but almost all of them were done on that “other” operating system. Recently, I had the opportunity to experience the benefits of upgrading to an SSD on two Linux systems.

Both systems began with clean installs of Ubuntu MATE 17.10 with full-disk encryption. The first system had an Intel Core 2 Duo E8400 CPU, 8 GB of RAM, and a Western Digital Black 7200 RPM 500 GB SATA II HDD. The second system was running an Intel i7 4770K processor with a Western Digital Black 7200 RPM 500 GB SATA III HDD. It also had 8 GB of RAM.

The Benchmark

For a benchmark, I used systemd-analyze’s “time” function to measure the boot time for each configuration.

Continue reading “Is Upgrading A Linux System To An SSD Worthwhile?”

Fix Ogg Files Corrupted By Easytag

Last week, I noticed that some of my music files would no longer play in Clementine or Rhythmbox (both of which use Gstreamer). I got the error below when I attempted to play the files:

Internal data stream error.

When I checked the affected files, all of which were Oggs, with oggz-validate (part of the package oggz-tools), I saw errors like this:

-00:00:00.002: serialno 1824847231: Packet out of order (previous 00:00:00.564)
-00:00:00.002: serialno 1824847231: Granulepos decreasing within track

Ogginfo (in the package vorbis-tools) reported the error as follows:

Negative or zero granulepos (-104) on Vorbis stream outside of headers. This file was created by a buggy encoder

I knew I had played the affected files successfully before, so it was clear something I had done recently caused the problem. Easytag was the answer.

Continue reading “Fix Ogg Files Corrupted By Easytag”

Firefox Screenshots: It Doesn’t Get Any Easier Than This

Firefox Screenshots Toolbar Icon

I’ve been a Firefox fan for years. In my experience, Firefox just keeps getting better. I used to use the Firebug extension for developer tools, then Mozilla included native developer tools in Firefox 27, allowing me to run one less extension. The Eyedropper was added to Developer Tools in Firefox 31, which makes grabbing color codes from a site I’m developing a snap. Now, Mozilla has added Firefox Screenshots, which gave me another one of those “Oh, cool!” software-feature moments.

Continue reading “Firefox Screenshots: It Doesn’t Get Any Easier Than This”