84EM

  • Home
  • Projects
  • Clients
  • Contact
  • People
  • Blog
  • Jobs
  • Home
  • Projects
  • Clients
  • Contact
  • People
  • Blog
  • Jobs

Cache and combine CSS

July 1, 2017 by Andrew Miller Leave a Comment

If you have a non-CMS site and wish to combine multiple CSS files into one, this code can get you started.

Simply link to this file instead of your stylesheets directly.

What the code is doing is reading a list of files, combining them into a single string, then writing out the contents to a new ‘combined.css’ file.

It also uses a timestamp to determine if the file should be regenerated. 86400 is the number of seconds in 24 hours.

This is a very simple script. More advanced functionality like comparing the modified file times of the CSS files instead could be added with ease.

Filed Under: PHP

Downloading a website recursively using wget

June 30, 2017 by Andrew Miller Leave a Comment

Here’s a bash script that you can run from the Linux command line to recursively download a website.

Filed Under: Linux, Ubuntu

Changing a plugin without changing the plugin

June 8, 2016 by Andrew Miller Leave a Comment

I often find myself being asked to change a wordpress.org or 3rd party purchased plugin. Editing the plugin directly is generally not a good idea, as any changes made will be lost the next time the plugin updates. And if you choose not to update the plugin and a security vulnerability is discovered at a later date, you may wind up with a comprimised site.

One of the most common changes is to modify text that is displayed publicly on the front end. One of the ways you can accomplish this is with the gettext filter. If the plugin has been properly setup for translations & internationalization, you can easily override this text either by adding some code to your theme’s functions file, or (preferably) by creating a new plugin with those customizations.

An example from the WordPress codex itself:

And a real world example from a recent project:

Filed Under: Wordpress

Unregister a WordPress post type

June 2, 2016 by Andrew Miller Leave a Comment

This function can prove useful in certain circumstances. For instance, a child theme whose parent has created one or more post types that aren’t needed.

Filed Under: PHP, Wordpress

84em joins CR Vault Collaborating & Coworking Space

May 17, 2016 by Andrew Miller Leave a Comment

I’m pleased to announce that 84em is now a member of the CR Vault Collaborating & Coworking Space! The Vault is community of talented entreprenuers and creative types that can connect, inspire and provide resources for one another. The office space is located on the 2nd floor of the Geonetric building in the heart of the New Bohemia neighboor Cedar Rapids. Exciting times are ahead!

CR Vault

Filed Under: News

Broken menus, pages, widgets in WordPress 4.5

April 25, 2016 by Andrew Miller Leave a Comment

If you upgraded to WordPress 4.5 and suddenly things relying on Javascript are broken on your page, check Chrome dev tools. You may see an uncaught error like this:

Uncaught Error: Syntax error, unrecognized expression: a[href*=#]:not([href=#])

The fix is pretty straight forward. There is a theme or plugin that uses that code. It needs to be replaced with a[href*="#"]:not([href="#"])

The reason for the problem is that WordPress now uses a newer version of jQuery which is less tolerant of incorrectly written code. Which in this case means that the # signs required parenthesis around them.

Filed Under: Wordpress

Insert a WordPress admin user if you don’t have database or WP access

February 29, 2016 by Andrew Miller Leave a Comment

Filed Under: Wordpress

Remove Revolution Slider meta box from all post types except ‘post’ and ‘page’

February 29, 2016 by Andrew Miller Leave a Comment

Filed Under: Wordpress

WordPress database error; what to do when repair doesn’t work & credentials are correct

November 30, 2015 by Andrew Miller Leave a Comment

I cloned a WordPress site, and the new site was throwing a database error page. I repaired all of the tables, I verified that the MySQL credentials were correct, but nothing worked. I finally looked at the wp_options table to see if anything looked wrong. Low and behold, the siteurl was blank. Adding the value back in fixed it.

Filed Under: Wordpress

Adding a handling charge to WooCommerce

November 25, 2015 by Andrew Miller Leave a Comment

Filed Under: PHP, Wordpress

  • 1
  • 2
  • 3
  • 4
  • Next Page »

Categories

  • Freeware / Open Source
  • HTML
  • Javascript
  • Linux
  • Magento
  • Netsuite
  • News
  • Perl
  • PHP
  • Ubuntu
  • Wordpress
Powered by
  • Home
  • Projects
  • Clients
  • Contact
  • People
  • Blog
  • Jobs

© 2019 84EM, LLC - A web development firm in Cedar Rapids, Iowa

Privacy Policy