WordPress is quickly becoming the leader in blogging and CMS technology. Over the past few years there have been more and more blogs and websites sprouting up using WordPress as their CMS system. These blogs range from small, personal sites to large corporate sites such as Yahoo, Playstation and The New York Times. That being said, it’s only natural that we seek little tweaks and tricks to get our WordPress sites to preform exactly as we’d like. Below are 5 quick and very useful little tweaks that can make a big impact on your WordPress site.

Custom “Read More” Links

This is a question I come across a lot. People want to break out of the ordinary “Read More” link, which leads to their post, and come up with something a little more creative. Well, it’s really simple if you follow these steps. The first step is to edit your posts and use a new custom field called “readmore” – the value being what you want to display instead of the standard “Read More”. Next, open up your index.php, category.php, archive.php and search.php and look for a line similar to this:

the_content("Read more");

And replace that line with this:

<?php $readmore = get_post_meta($post->ID, 'readmore', true); ?>
<?php if (!$readmore) { $readmore = 'Read More &raquo;'; } ?>
<?php the_content($readmore); ?>

Allow Only Your IP Address To Access The Admin Area

Security within WordPress is always a concern. This is a wonderful technique for anyone who is the sole administrator of their site, and doesn’t have anyone accessing the administrative area from any location other than their own. All you have to do is add your IP on line 8. You can add multiple IP Addresses if needed.

AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName "Example Access Control"
AuthType Basic
<LIMIT GET>
order deny,allow
deny from all
allow from xx.xx.xx.xx
</LIMIT>

Source

Add an Author Bio to Each Post

If you have multiple contributors to your site, this is an excellent method to distinguish who’s who. This will help your readers understand a little more about the author and in many cases help them relate as well. Some themes come equipped with this feature, but if yours doesn’t, simply add the following to your functions.php file:

function get_author_bio ($content=''){
    global $post;

    $post_author_name=get_the_author_meta("display_name");
    $post_author_description=get_the_author_meta("description");
    $html="<div class='clearfix' id='about_author'>\n";
    $html.="<img width='80' height='80' class='avatar' src='http://www.gravatar.com/avatar.php?gravatar_id=".md5(get_the_author_email()). "&default=".urlencode($GLOBALS['defaultgravatar'])."&size=80&r=PG' alt='PG'/>\n";
    $html.="<div class='author_text'>\n";
    $html.="<h4>Author: ".$post_author_name."</h4>\n";
    $html.= $post_author_description."\n";
    $html.="</div>\n";
    $html.="<div class='clear'></div>\n";
    $content .= $html;
    }

    return $content;
}

add_filter('the_content', 'get_author_bio');

Source

Customize Your Login Page

As nice as the WordPress logo is, it doesn’t hurt to put your own into the login page instead. This will give your site a more customized appearance and make your users / contributors who log in feel that they are at a more specific, rather than generic, site. Just place the following in your functions.php file and replace the image url:

function my_custom_login_logo() {
    echo '<style type="text/css">
        h1 a { background-image:url('.get_bloginfo('template_directory').'/images/custom-login-logo.gif) !important; }
    </style>';
}

add_action('login_head', 'my_custom_login_logo');

Source

Monitor your server in WordPress dashboard

Everyone is concerned about their site’s performance. What better solution than to monitor your server right from your dashboard? This nifty tweak will create a dashboard widget that will do just that. Add this to your functions.php file:

function slt_PHPErrorsWidget() {
$logfile = ‘/home/path/logs/php-errors.log’; // Enter the server path to your logs file here
$displayErrorsLimit = 100; // The maximum number of errors to display in the widget
$errorLengthLimit = 300; // The maximum number of characters to display for each error
$fileCleared = false;
$userCanClearLog = current_user_can( ‘manage_options’ );
// Clear file?
if ( $userCanClearLog && isset( $_GET["slt-php-errors"] ) && $_GET["slt-php-errors"]==”clear” ) {
$handle = fopen( $logfile, “w” );
fclose( $handle );
$fileCleared = true;
}
// Read file
if ( file_exists( $logfile ) ) {
$errors = file( $logfile );
$errors = array_reverse( $errors );
if ( $fileCleared ) echo ‘<p><em>File cleared.</em></p>’;
if ( $errors ) {
echo ‘<p>’.count( $errors ).’ error’;
if ( $errors != 1 ) echo ‘s’;
echo ‘.’;
if ( $userCanClearLog ) echo ‘ [ <b><a href="'.get_bloginfo("url").'/wp-admin/?slt-php-errors=clear" onclick="return confirm(\'Are you sure?\');">CLEAR LOG FILE</a></b> ]‘;
echo ‘</p>’;
echo ‘<div id=”slt-php-errors” style=”height:250px;overflow:scroll;padding:2px;background-color:#faf9f7;border:1px solid #ccc;”>’;
echo ‘<ol style=”padding:0;margin:0;”>’;
$i = 0;
foreach ( $errors as $error ) {
echo ‘<li style=”padding:2px 4px 6px;border-bottom:1px solid #ececec;”>’;
$errorOutput = preg_replace( ‘/\[([^\]]+)\]/’, ‘<b>[$1]</b>’, $error, 1 );
if ( strlen( $errorOutput ) > $errorLengthLimit ) {
echo substr( $errorOutput, 0, $errorLengthLimit ).’ [...]‘;
} else {
echo $errorOutput;
}
echo ‘</li>’;
$i++;
if ( $i > $displayErrorsLimit ) {
echo ‘<li style=”padding:2px;border-bottom:2px solid #ccc;”><em>More than ‘.$displayErrorsLimit.’ errors in log…</em></li>’;
break;
}
}
echo ‘</ol></div>’;
} else {
echo ‘<p>No errors currently logged.</p>’;
}
} else {
echo ‘<p><em>There was a problem reading the error log file.</em></p>’;
}
}

// Add widgets
function slt_dashboardWidgets() {
wp_add_dashboard_widget( ‘slt-php-errors’, ‘PHP errors’, ‘slt_PHPErrorsWidget’ );
}
add_action( ‘wp_dashboard_setup’, ‘slt_dashboardWidgets’ );

Source

WordPress is a constantly growing, user-friendly platform that shows no signs of slowing down. It’s versatility makes it so unique from the other CMS systems out there. Plugins, being a major part of the WordPress system, are endlessly being created and each one seems to be an improvement from the last. We have taken the liberty of sharing 5 new WordPress plugins that we feel are, or will be, big hits in the very near future.

The WordPress Bar Plugin

What does this plugin do?

Seen the DiggBar on Digg.com?  Adds a similar feature to your WordPress blog.  Use your blog as a short link service with Easy Link Creation.  Feature any link on the internet with a custom URL such as http://www.internetriot.com/?bing. Also feature social network links such as Facebook, Twitter, and Digg.

Watch A Video Overview of The WordPress Bar

Features:

  • Feature a “DiggBar like” to all external links
  • Whitelist domains that you do not want to apply The WordPress Bar
  • Give your users up to 16 social network sharing links
  • Title and Logo branding options for your WordPress Bar
  • Multiple WordPress Bar color options
  • Track stats for how often featured links are viewed by your users
  • NEW – Show related posts for each external link
  • NEW – Easy Link Creation.  Simply put any ? then URL after your blogs URL and The WordPress Bar will create a new link for it, featuring The WordPress Bar above that site.  Example:  www.internetriot.com?http://www.woot.com will create a WordPress Bar link for woot.com
  • NEW – Custom Link Identifiers.  Customize the identifiers in your URL to make your links more memorable to your readers. Example: Make www.internetriot.com/?bing show The WordPress Bar for Bing.com

Click here to download the The WordPress Bar Plugin

PixoPoint Menu

It has been a long time coming, but we are pleased to announce that our new PixoPoint Menu plugin is finally ready for beta release. You can download it at the WordPress plugin repository.

Designing your menu

Unlike the Multi-level Navigation plugin which it will eventually replace, this new plugin does not require you to visit our dropdown menu CSS generator to modify the look and feel of it. You can redesign your entire menu from within your own site. When you click the “Reload” button in the plugins editing panel, the design specifications are sent back to PixoPoint.com where it is processed and then sent back to your own site where it displays in your menu. When you choose ’save’, that design is stored on your site for your visitors to enjoy!

Demonstration/Download

You can see the menu in action on the Dunedin Ice Hockey Association website and it can be downloaded in the WordPress plugin repository.

WordPress Dashboard Twitter

Twitter is everywhere. So why not in your WordPress Dashboard? WordPress Dashboard Twitter is a Dashboard Widget that displays Twitter @replies, direct messages, sent messages and favorites the convenient way within your WordPress Dashboard. WordPress Dashboard Twitter turns your Dashboard into a Twitter client.

The Dashboard widget lets you update your status, send direct messages, follow your mentions, list direct messages, sent messages and your favorites in a simple tab interface. All in a single widget. No seperate admin page needed. All the Twitter stuff you need right where you need it.

Introducing WordPress Dashboard Twitter on Vimeo.

Note: The plugin requires at least WordPress 2.7 and PHP 5 in order to run.

At a glance:

  • Adds a Twitter Client to your WordPress Dashboard only
  • Display Mentions, Direct Messages, Sent messages and Favorites in a tabbed interface
  • Reply to a Twitter status or Direct Message from within the Dashboard Widget
  • No dedicated page in your WordPress admin panel
  • All customization can be done through the Widget’s Configuration
  • No impact on your blog’s frontend or other backend pages
  • Shortening URLs with wp.gd (new!) or tr.im
  • One-Click-Image-Upload for TwitPic
  • Whenever you check your incoming links or WordPress News in the Dashboard, you can check your Twitter Status as well

WordPress Plugin: One-Time Password

The simple to use One-Time Password plugin enables you to login to your WordPress weblog using passwords which are valid for one session only. One-time passwords prevent stealing of your main WordPress password in less trustworthy environments, like internet cafés, for example by keyloggers. For each login you can choose between using your main password or a one-time password. The one-time password system conforms to RFC 2289 of the Internet Engineering Task Force (IETF).

Support

If the usage instructions and frequently asked questions don’t help, you can write a comment on the plugin home page.

WP-Devel Plugin

The WP-Devel plugin for WordPress features a ton of debug options to help developers. Debug information is easily turned on/off from the WP-Devel toolbar.

WP-Devel Toolbar ScreenshotIncluded debug information:

  • Show template file viewing
  • Display page/query load times
  • Display all queries executed w/ load times
  • Show all phpinfo

WP-Devel also utilizes the Krumo debugging tool to easily view debug information including:

  • WP_Query and WP array values
  • included files
  • included functions
  • declared classes
  • HTTP Headers
  • defined constants
  • current cookies
  • values in $_SERVER
  • values in $_ENV
  • values in $_SESSION
  • values in $_POST
  • values in $_GET
  • values in $_REQUEST

Installation:
1. Upload the wp-devel folder to the plugins directory in your WordPress or WPMU installation
2. Activate the plugin

That’s it! The WP-Devel toolbar will automatically display for all site admins allowing you to tweak what debug information is displayed quickly and easily anywhere on your website.

Visit the WP-Devel Plugin homepage or download it from WordPress.org.