Archive > July 2009

Wordpress remove links from comments

admin » 23 July 2009 » In Uncategorized » No Comments

Get Rid Of HTML Links In Comments

The problem.
Bloggers are always looking to promote their blogs, and spammers are everywhere. One thing that totally annoys me on my blogs is the incredible amount of links left in comments, which are usually irrelevant. By default, WordPress transforms URLs in comments to links. Thankfully, if you’re as tired of comment links as I am, this can be overwritten.

The solution.
Simply open your function.php file and paste in this code:

function plc_comment_post( $incoming_comment ) {
	$incoming_comment['comment_content'] = htmlspecialchars($incoming_comment['comment_content']);
	$incoming_comment['comment_content'] = str_replace( "'", ''', $incoming_comment['comment_content'] );
	return( $incoming_comment );
}
 
function plc_comment_display( $comment_to_display ) {
	$comment_to_display = str_replace( ''', "'", $comment_to_display );
	return $comment_to_display;
}
 
add_filter('preprocess_comment', 'plc_comment_post', '', 1);
add_filter('comment_text', 'plc_comment_display', '', 1);
add_filter('comment_text_rss', 'plc_comment_display', '', 1);
add_filter('comment_excerpt', 'plc_comment_display', '', 1);
function plc_comment_post( $incoming_comment ) {
	$incoming_comment['comment_content'] = htmlspecialchars($incoming_comment['comment_content']);
	$incoming_comment['comment_content'] = str_replace( "'", ''', $incoming_comment['comment_content'] );
	return( $incoming_comment );
}

function plc_comment_display( $comment_to_display ) {
	$comment_to_display = str_replace( ''', "'", $comment_to_display );
	return $comment_to_display;
}

add_filter('preprocess_comment', 'plc_comment_post', '', 1);
add_filter('comment_text', 'plc_comment_display', '', 1);
add_filter('comment_text_rss', 'plc_comment_display', '', 1);
add_filter('comment_excerpt', 'plc_comment_display', '', 1);

Once you have saved the file, say goodbye to links and other undesirable HTML in your comments.

Code explanation.
The first thing we did was create two functions that replace HTML characters with HTML entities. Then, using the powerful add_filter() WordPress function, we hooked the standard WordPress comments processing functions to the two functions we just created. This makes sure that any comments added will have their HTML filtered out.

Continue reading...

Search Intent, Segmentation

admin » 23 July 2009 » In SEO Kennisbank » No Comments

Navigational Queries:

Opportunities – Pull searcher away from destination; get ancillary or investigatory traffic
Average Value - Generally Low

Informational Queries:

Opportunities - Brand searchers with positive impression of your site, information, company, etc; Attract inbound links; Receive attention from journalists/researchers; Potentially convert to sign-up or purchase
Average Value - Middling

Commercial Investigation Queries:

Opportunities – Convert to member/sign-up; Sway purchase decision; Collect email; Get user feedback/participation
Average Value - High

Transactional Queries:

Opportunities - Achieve transaction (financial or other)
Average Value – Very High

Continue reading...

SEOmoz | 10 Steps to Advanced Keyword Research

admin » 23 July 2009 » In SEO Kennisbank » No Comments

#1 – Relative Search Volume from 3 Sources

There are three sources on the web that I’ve found to work best for comparative numbers research. These are:

1. Google Adwords: Keyword Tool – enter any term or phrase and get back data about both the average search volume and the volume from the previous month.

2. MSN AdCenter: Research Keywords Tool – you need to be logged in to use this, but the data is solid and shows actual counts.

3. Wordtracker: Keyword Tool – although the numbers Wordtracker shows are frequently less accurate than the two above, they are reasonably decent for estimating comparative search volume. Unfortunately, due to the declining share of Wordtracker’s data sources (the Infospace owned search engines – Metacrawler, Dogpile, DoGreatGood, etc.), niche and long tail term volume estimates can be way off.

via SEOmoz | 10 Steps to Advanced Keyword Research.

Continue reading...

5 Ways To Use WordPress Widgets

admin » 15 July 2009 » In Wordpress SEO » No Comments

5 Useful And Creative Ways To Use WordPress Widgets

If you’ve been reading some of the previous WordPress-related articles here on Smashing Magazine, you’ll know that WordPress is much more than a blogging platform. It can be used as a CMS, too. And WordPress widgets are a powerful tool in your WordPress development arsenal.

When you think of WordPress widgets, you may think they’re just a way to rearrange various items in your blog’s sidebar without touching any code. Sure, that’s nice and all, but that’s really just the tip of the iceberg of all the things WordPress widgets can do.

Read article

Continue reading...

WordPress Configuration Tricks

admin » 01 July 2009 » In Wordpress SEO » No Comments

Moving Your wp-content directory

As of WordPress version 2.6, you may change the default location of the wp-content directory. There are several good reasons for doing this, including enhancement of site security and facilitation of FTP updates. Here are some examples:

// full local path of current directory (no trailing slash)
 
define('WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'].'/path/wp-content');
 
// full URI of current directory (no trailing slash)
 
define('WP_CONTENT_URL', 'http://domain.tld/path/wp-content');

You may also further specify a custom path for your wp-content directory. This may help with compatibility issues with certain plugins:

// full local path of current directory (no trailing slash)
 
define('WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'].'/path/wp-content/plugins');
 
// full URI of current directory (no trailing slash)
 
define('WP_PLUGIN_URL', 'http://domain.tld/path/wp-content/plugins');

via WordPress Configuration Tricks.

Continue reading...