Web Site Design Blog

Blog Category: WordPress
November 27, 2015

Musicbox plugin allows you to create multiple playlist widgets in WordPress.

Playlist with song details including:

  • Song Name
  • Artist
  • 30 second preview from iTunes
  • Album or collection
  • Artwork
  • Link to iTunes
  • Create multiple playlist widgets in WordPress

You may also use a shortcode “musicbox” to display the musicbox inside a post with the following parameters:

  • musicbox_id * required value: the id of the musicbox to display
  • description optional value: whether to display description or not. “1” or “0”, default is “0”.
  • autoplay optional value: whether to autoplay list or not. “1” or “0”, default is “0”.
  • tracks_perpage optional value: how many tracks to show before paginating. Numeric value. Default is “10”.

Ex.
[musicbox musicbox_id="1" description="1" autoplay="1" tracks_perpage="2"]

This plugin uses soundmanager2 and its’ 360 player UI.

Visit the plugin at WordPress.org for more information and to download.
wordpress.org/plugins/musicbox

January 14, 2015

Add Google’s latest simple checkbox reCAPTCHA to WordPress default login page. This plugin will help secure your wordpress administration area against brute force hacking attacks using the latest, simple and elegant ‘No Captcha’ reCaptcha checkbox from Google.

* PHP 5.3 or greater required
Which you probably should be running by now anyways.

1. Download Plugin.

2. Install Plugin.

3. Get reCaptcha API Keys from Google.

4. Enter Keys in WP Admin -> Settings -> reCaptcha

You will need to check the Google reCaptcha box next time you log in.

Available on WordPress.org

Fork on Github

June 4, 2012

I recently added the Facebook comments and Addthis plugins to my site. One of the issues that occurred was a duplicate ‘Like’ button when the comments plugin loaded. After a quick look at the comments plugin code, I saw that the Facebook javascript SDK was being loaded in the footer.

add_action('wp_footer', 'fbmlsetup', 100);

My first instinct was to move this to the ‘wp_head’ hook, then I realized that wouldn’t be good because it would place the <div> and script inside the <head> element of the page. My experience told me this code is supposed to live right after the <body> tag. Apparently there is no such hook built into WordPress, but to create one in your theme is simple and painless.

In your theme’s functions.php add the following function named ‘after_body’:

function after_body(){
	do_action('after_body');
}

In your theme’s header.php call the ‘after_body’ function right after the <body> tag:

<body>
<?php after_body(); ?>

Now just a little hack to the plugin code, I commented out the ‘wp_footer’ hook and replaced it with the ‘after_body’ hook.

// moving this to head to avoid conflict with addThis buttons ... 
// add_action('wp_footer', 'fbmlsetup', 100);
add_action('after_body', 'fbmlsetup', 100);

This resolved the issue and helped me understand how simple it is to create a custom action hook in WordPress.