Quick Tip: How to Add FontAwesome (or Other Icon Fonts) to your WP Theme or Plugin

So, you want to use FontAwesome in your Theme, eh? Add the following snippet to your functions.php file:

wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css' );

Do you want to use it in your Plugin? Just place that code in one of your functions within your plugin file and hook into the wp_enqueue_scripts Action:

add_action( 'wp_enqueue_scripts', 'plugin_slug_load_iconfont' );

function plugin_slug_load_iconfont() {
    wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css' );
}

The same principle holds true for the other icon fonts that are available online.

But here, this one’s even easier: Dashicons. They’re already included as part of the WordPress admin dashboard, so in order for you to get them working for non-logged in users, all you have to do is:

add_action( 'wp_enqueue_scripts', 'plugin_slug_load_dashicons' );

function plugin_slug_load_dashicons() {
    wp_enqueue_style( 'dashicons' );
}

Simple, right?

Quick Tip: You have reached a domain that is pending ICANN verification

icann-registration-pending
Just tried to log into one of my client’s websites this morning and was met with the lovely notification you see here. I’ve never encountered this before on any of the other sites I’ve built.

So, why am I seeing this now? Apparently, the domain owner’s name and email address were never verified via the follow-up email they sent out after the domain was registered.

Here’s what Ryan Your Tech Guy says:

The domain has to be verified. You will have to verify the domain with the email sent to the whois contact email. Once you have verified the domain, ICANN will un-suspend the domain.

So, if you find yourself facing a similar message one day when trying to visit or work on your site (or any other site for that matter), do yourself a favor and (1) check your email, then (2) verify your contact info (or be helpful and “resend verification email” to the site owner – hopefully with an Inbox full of those emails, they’ll remember to click on one to verify their info).

Here’s some additional info:

  1. Dreamhost’s Official Verification Policy
  2. Ryan Your Tech Guy’s Write-up
  3. TechRepublic’s News Article

(Actually, I’m a bit surprised to be seeing this now. I’ve worked on and built up the site since July 2014. Why suspend it after 6 months of production? Why not earlier?)

Quick Tip: Problems After Upgrading WordPress? Try Some of These Suggestions

If you get stuck in a redirect loop, or get any number of HTTP errors (404, 500, 302, etc), then it probably has something to do with your .htaccess file.

  1. WordPress htaccess Rules
  2. Extended Instructions for Upgrading WordPress
  3. phpMyAdmin Fix

Quick Tip: WordPress Site Hacked? Follow These Links

One KEY thing to keep in mind BEFORE a hack:

Always have a backup.

BackWPup is a great (free) plugin that’s super-easy to use and setup automatic backups to Dropbox and other Cloud storage services. I use it on all my sites and highly recommend it (Multi-site compatible as well).


The following was originally posted by a Volunteer moderator on the WordPress.org forums, but they are great links worth keeping a copy of for later reference:

You need to start working your way through these resources:

Additional Resources:

Quick Tip: Use Chrome’s Emulator Tool for Better Development

Google Chrome has a pretty nifty emulator tool that enables better website development by emulating the different devices that you would want to test your websites on.

A few keys points about the emulator that makes it unique and much better for development than merely stretching your browser window to various sizes:

  1. Chrome’s minimum browser width (400px) is still wider than the smallest device size (320px iPhone 3/4)
  2. Using the emulator tool also changes the user agent variable in Chrome so that it thinks and acts as if it were the actual device it is emulating
  3. The emulator shows a grid and rulers with pixel dimensions behind the device window

How to use the Chrome Emulator?

  1. Open the Element Inspector (right-click “Inspect Element”)
  2. Click on the mobile device icon in the upper-left corner of the Element Inspector (see screenshot)
  3. Select the device you wish to emulate from the dropdown menu at the top (see screenshot)
  4. Tip: Refresh the page for proper user agent spoofing and viewport rendering
google-chrome-inspector-element-device-mode
1. Open the Element Inspector and click the mobile device icon
google-chrome-inspector-element-device-mode-activated
2. Select the device you wish to emulate from the dropdown menu

 

Quick Tip: Learn the basics of SEO and non-coding WordPress Customization

WordPress currently powers over 23% of ALL the world’s websites. It powers sites such as CNN, Jay-Z, and Mashable.

So, you want a highly customizable site without coding?

Divi WordPress Drag and Drop Theme
Divi WordPress Drag and Drop Theme

Find a drag-and-drop Theme like Divi or Enfold for something easier to build (no code – EXTREMELY customizable). You’ll need to go self-hosted (no more WordPress.com).

You want easy SEO?

WordPress plugin SEO by Yoast
WordPress plugin SEO by Yoast

For SEO, sign up for Google Analytics to start tracking your site and learning which keywords attract visitors. Also, get a good couple of good WP plugins like SEO by Yoast (which is the highest ranked and most downloaded SEO plugin for WP in history). Also get Google Analytics by Yoast for better tracking.

Here’s the Definitive Guide to WordPress SEO by Yoast.

You want to learn the basics of SEO tactics?

Jon Duckett's HTML & CSS book
Jon Duckett’s HTML & CSS book

I recently read through HTML & CSS by Jon Duckett and it has a simple (though comprehensive) 2-page walkthrough on SEO. The basic things you should know are:

  1. On-site SEO tactics and
  2. Off-site SEO tactics

On-site SEO tactics include:

Having your targeting keywords appear in every:

  1. Page <title>
  2. URL
  3. Headings <h1>
  4. Body text 2-3 times each
  5. Hyperlinks  (make them descriptive, not just “click here”)
  6. Image <alt> attributes
  7. Page <meta> description

(The Yoast SEO plugin takes care of ALL of this for you on a page-by-page basis).

Off-site SEO tactics include:

Getting links IN to your site from other (relevant) sites. You can do this through:

  1. Social Media sharing (and enabling social sharing buttons with other plugins)
  2. Commenting (and ADDING VALUE) on other blogs in your industry with a link back to your site (no spam and no “Nice post” stuff either)
  3. Guest posting on other blogs with a link back to your site.

Hope this helps you build a better website!~