ID && $post->post_name != '' ) { return $slug; } $stopwordsserialized = get_option('slugstopwords'); $stopwordsArray = array(); if( $stopwordsserialized != '' ) $stopwordsArray = unserialize( $stopwordsserialized ); $slugArray = explode( "-", $slug ); $slugArray = array_diff( $slugArray, $stopwordsArray ); $slug = implode( "-", $slugArray ); while( strpos( $slug, "--" ) !== false ) $slug = str_replace( "--", "-", $slug ); if( substr( $slug, 0, 1 ) == "-" ) $slug = substr( $slug, 1 ); if( substr( $slug, -1, 1 ) == "-" ) $slug = substr( $slug, 0, strlen($slug) -1 ); return $slug; } // Options hook function add_remove_stopwords_from_slug_options_page() { if (function_exists('add_options_page')) { add_options_page('Slug Stopwords', 'Slug Stopwords', 10, 'slugstopwords', 'remove_stopwords_from_slug_options_subpanel'); } } // Options panel and form processing function remove_stopwords_from_slug_options_subpanel() { if (isset($_POST['slugstopwords'])) { $slugstopwords = $_POST['slugstopwords']; $slugstopwordsArray = explode( ",", $slugstopwords ); $newslugstopwordsArray = array(); foreach( $slugstopwordsArray as $stopword ) { $stopword = trim( $stopword ); if( $stopword != '' ) $newslugstopwordsArray[] = $stopword; } $slugstopwords = serialize( $newslugstopwordsArray ); update_option('slugstopwords', $slugstopwords); } ?>

Remove Stopwords From Slug

Write here the stopwords that you want to remove from the URL separated by commas. If you want an example or default stopwords for some languages you can donwload them from the next links:

English: http://www.berriart.com/wp-content/english-stopwords.txt

EspaƱol: http://www.berriart.com/wp-content/espanol-stopwords.txt

If you have an stopwords list in other language send me please to alberto@berriart.com:
Remember that the words you list here never won't be in the post slug. If you want to force a stopword to appear in the slug you must remove it from the list or uninstall the plugin temporaly.

You can find more info here, and if you find this plug-in useful, why don't you write a post and recommend it to your readers? ;)