Results 1 to 6 of 6
Threaded View
-
18th Dec 2011, 05:29 PM #1OPMember
[WordPress] Remove Stopwords for Better SEO
I found this when googling about pluginless solution for cleaning up your post/page titles from stopwords. on the themes function.php file, before the closing ( ?> ), add this code snippet.
PHP Code:add_filter('sanitize_title', 'remove_false_words');
function remove_false_words($slug) {
if (!is_admin()) return $slug;
$slug = explode('-', $slug);
foreach ($slug as $k => $word) {
//false words list separated for commas
$keys_false = 'a,about,above,across,after,again,against,all,almost,alone,along,already,also';
$keys = explode(',', $keys_false);
foreach ($keys as $l => $wordfalse) {
if ($word==$wordfalse) {
unset($slug[$k]);
}
}
}
return implode('-', $slug);
}
Note: This will automatically change your old posts url only if you edit them, so you don't have to worry about 404 errors
Source: WPSnipp.comRocke Reviewed by Rocke on . [WordPress] Remove Stopwords for Better SEO I found this when googling about pluginless solution for cleaning up your post/page titles from stopwords. on the themes function.php file, before the closing ( ?> ), add this code snippet. add_filter('sanitize_title', 'remove_false_words'); function remove_false_words($slug) { if (!is_admin()) return $slug; $slug = explode('-', $slug); foreach ($slug as $k => $word) { //false words list separated for commas $keys_false = Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
How to remove yieldmanager from wordpress blog
By Dj.IcE in forum Webmaster DiscussionReplies: 10Last Post: 17th Mar 2012, 06:35 PM -
malware detected.....how to remove from Wordpress
By avRo in forum Technical Help Desk SupportReplies: 4Last Post: 10th Mar 2012, 02:46 PM -
[wordpress]how to remove site option in comment
By VagosDown in forum Webmaster DiscussionReplies: 11Last Post: 5th Nov 2011, 06:20 AM -
Remove header discription Wordpress.
By thecompgame in forum Technical Help Desk SupportReplies: 2Last Post: 19th Jul 2011, 10:21 AM -
Wordpress Copyright Links Remove?
By EL-Warez in forum WordpressReplies: 3Last Post: 2nd Aug 2010, 05:24 PM
themaCreator - create posts from...
Version 3.25 released. Open older version (or...