Skip to content

Category Archives: Web Development

Add WordPress Featured Image as Automatic Facebook Like Button Image

27-Aug-11

Add the following in header.php, within the html head tag. <?php if (has_post_thumbnail() && is_single()) { // if feat im exists && current page is single article $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'medium' ); $thumb_url = $thumb['0']; ?> <meta property="og:image" content="<?php echo $thumb_url; ?>" />

htaccess 301 redirect from all pages to one page

04-Apr-11

RedirectMatch permanent /.* http://www.newdomain.com/

Create Favicon (Multiresolution) on OS X

28-Feb-11

IcoMaker, it works. "On the mac, this is a snap, thanks to Takeshi Ogihara’s IcoMaker. Head over to his page (assuming it’s a he), and look for the link at the bottom of the page, something like: “IcoMaker Distribution Package, 84KB”." via steve cooley presents » Blog Archive » HOWTO: create a favicon.ico on Mac [...]

Load jQuery Slideshow After Page Has Loaded

17-Feb-11

I needed a slideshow that would load (in a way, asynchronously) after the page has been loaded and would show something without JavaScript. This solution requires jQuery and jQuery Cycle plugin (lite version will do). <div id="slideshow"> <img src="default-image.jpg" alt="" /><!--defaults to this image without javascript --> </div> <script type="text/javascript"> $(document).ready(function() { //// random slides [...]

Scriptaculous Autocompleter vs jQuery Autocomplete [Multiple Fields]

22-Dec-10

Scriptaculous Autocompleter does not support multiple input fields, so go for jQuery if possible. jQuery UI has autocomplete built-in.