Web Site Design Blog

Tag: Wordpress
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.

June 4, 2011

Patrick Higgins came to us looking for a ‘bespoke’ design for TropicBird Ecotours, a sailing charter specializing in a personalized experience for Naples area visitors wanting to explore the rare beauty of the 10,000 Islands National Wildlife Refuge and Rookery National Estuarine Research Reserve under sail.

We took some inspiration from the original 2005 addesignconcepts.com design, nature photography from our own collection and other local sources. WordPress was used as a CMS and a custom theme was developed according to the design specifications. Fortunately TropicBird Ecotours had it’s own wealth of high quality photos and well written content that made the creation of this website a pleasurable and inspiring endeavor.

TropicBird Ecotours

In a addition to the TropicBird Ecotours website we also set up and linked a Facebook fan page. Here is what Mr. Higgins testimonial following the launch of his site:

I choose Ross for my website design because it was clear from the outstart that he was completely up to date on electronic media, he understood the brief, would be sensitive to my message and would be able to guide me on appropriate content. He delivered my site on time and on cost with the minimum of revisions and was very responsive throughout the process. I have no hesitation in recommending him.

Patrick Higgins
TropicBird Ecotours

April 22, 2010

When I am working on a website I have a local development version that I program and test locally. When an update is implemented, it is tested locally before it is copied to the live server. WordPress sites are treated no differently. Here is how you can make the wp-config.php portable to work in your live and local environment. Simply replace the variables below with the actual information for your web site and you will be have a wp-config.php that can happily thrive in both environments.

I defined an additional constant ‘LIVE’ that I can refer to elsewhere in my code to determine if I am on the live server or not.

wp-config.php


if($_SERVER[‘HTTP_HOST’]==’livedomain.com’ || $_SERVER[‘HTTP_HOST’]==’www.livedomain.com’){

define(‘DB_NAME’, ‘db_name_live’); // The name of the database
define(‘DB_USER’, ‘mysql_username_live’); // Your MySQL username
define(‘DB_PASSWORD’, ‘mysql_password_live’); // …and password
define(‘DB_HOST’, ‘localhost’); // db host
define(‘DB_CHARSET’, ‘utf8’);
define(‘DB_COLLATE’, ”);
define(‘AUTH_KEY’, ‘put your unique phrase here’);
define(‘SECURE_AUTH_KEY’, ‘put your unique phrase here’);
define(‘LOGGED_IN_KEY’, ‘put your unique phrase here’);
define(‘LIVE’, true);

}else{

define(‘DB_NAME’, ‘name_of_db_local’); // The name of the database
define(‘DB_USER’, ‘mysql_username_local’); // Your MySQL username
define(‘DB_PASSWORD’, ‘mysql_password_local’); // …and password
define(‘DB_HOST’, ‘localhost’); // db host
define(‘DB_CHARSET’, ‘utf8’);
define(‘DB_COLLATE’, ”);
define(‘AUTH_KEY’, ‘put your unique phrase here’);
define(‘SECURE_AUTH_KEY’, ‘put your unique phrase here’);
define(‘LOGGED_IN_KEY’, ‘put your unique phrase here’);
define(‘LIVE’, false);

}

// You can have multiple installations in one database if you give each a unique prefix
$table_prefix = ‘wp_’; // Only numbers, letters, and underscores please!

// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to ‘de’
// to enable German language support.
define (‘WPLANG’, ”);

/* That’s all, stop editing! Happy blogging. */

if ( !defined(‘ABSPATH’) )
define(‘ABSPATH’, dirname(__FILE__) . ‘/’);
require_once(ABSPATH . ‘wp-settings.php’);
?>

MySQL Queries

Another thing to be conscious of when moving between a live and local server environment with WordPress are couple of records in the wp_options table of the database. The siteurl and liveurl records will be different in your local environment and live environment. If you copy your database from one to the other, just run the appropriate query below (with the liveurl and localurl variables changed to your actual data) depending on if you are copying from local to live or live to local.

Live to Local Query

Run query on local database.

UPDATE wp_options SET option_value=’http://localurl.com’ WHERE option_name=’siteurl’ ;

UPDATE wp_options SET option_value=’http://localurl.com’ WHERE option_name=’home’

Local to Live Query

Run query on live database.

UPDATE wp_options SET option_value=’http://liveurl.com‘ WHERE option_name=’siteurl’ ;

UPDATE wp_options SET option_value=’http://liveurl.com’ WHERE option_name=’home’

If you have any questions or suggestions, your comments are welcome below.

September 26, 2009

You can now log in to post comments on my blog using FaceBook via WP-FacebookConnect.

* I have subsequently removed this functionality.
– The Manager

March 21, 2009

This site is currently running on word press blogging tool and publishing platform. I installed the Cleanmachine theme but that will likely change soon and often as I experiment with differnt looks and functionality. You might be wondering why I didn’t design my own site. Currently I am interested in learning about existing technology and how to increase efficiency for myself and clients. I am more intersted in learning how to use and integrate existing systems than to build new ones from scratch. The wheel has been invented.

Inevitably I will end up having to build new systems, but my experiences using existing ones will improve my skill at developing new ones.