Jump to Navigation
 

HTML: Favicon

A “favicon” is an icon created to show up in your favorites (bookmarks) folder.  It’s used to distinguish your web page from all the others in the favorites folder.

One way to apply a favicon to your website it to put this line of code within the head section of your html code:


The image you use can be any type of image file with any name. It does not have to be an icon file (ie. “favicon.ico” ) .

Video: Sleepwalking Dog

Wordpress: Retrieve URL of First Image in Post

This is VERY useful for creating thumbnail images for blog posts.

Place this code in your theme’s “functions.php” file:

/i', $post->post_content, $matches);
$first_img = $matches [1] [0];

// no image found display default image instead
if(empty($first_img)){
$first_img = "/images/default.jpg";
}
return $first_img;
}
?>

Then call this within the template:


Source: http://wordpress.org/support/topic/246893

HTML: Conditional Comments for IE

If you ever need to single IE out in your CSS, but don’t want to use hacks, try surrounding your body content with these:




Source: Microsoft Library

Wordpress: Title Tags

Title tags are what show the title of the page your on at the top of your browser window.

This snippet of code is good to use in your Wordpress “header.php” template file between the title tags.