hey like i said in the question i want use the plus sign(+) instead of dashes so the posts will be like that: some+post+test . i did something a filter to do that so in the front page it looks like good but when i try to open the post i see the 404 error and in admin panel the filter don't works(in the editable slug field!) so this is the filter: <?php function sanitize_permalink_with_undescores($title) { $title = strip_tags($title); // Preserve escaped octets. $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title); // Remove percent signs that are not part of an octet. $title = str_replace('%', '', $title); // Restore octets. $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title); $title = remove_accents($title); if (seems_utf8($title)) { if (function_exists('mb_strtolower')) { $title = mb_strtolower($title, 'UTF-8'); } $title = utf8_uri_encode($title); } $title = strtolower($title); $title = preg_replace('/&.+?;/', '', $title); // kill entities $title = preg_replace('/[^%a-z0-9 _-]/', '', $title); $title = preg_replace('/\s+/', '+', $title); $title = preg_replace('|_+|', '+', $title); $title = trim($title, '+'); return $title; } remove_action('sanitize_title', 'sanitize_title_with_dashes'); add_action('sanitize_title', 'sanitize_permalink_with_undescores'); ?> PHP: another question , when i use non-latin characters the wordpress break the permalink and preserve just 30 letters(NB: characters works fine just they're broken) !! how can i solve that and make the slug accept unlimited letters of non latin characters? and thanks .
Why would you want to do this? You do understand that SE's read URL structure the same and if you change the structure to something that is not supported you are going to ruin your blog, right? Can you show me an example of a website that uses "+" in it's URL structure instead of "-"?
search this in G. Many sites use + sign their URLs and rank quite well. "http://search.allheart.com/?query=" ex: http://search.allheart.com/?query=howie+lab+coat&c=y1
take , this one of many times that's use plus sign : http://www.araby-news.com/news/هدية+من+عالم+التقنية%3A+برنامج+BitDefender+Internet+Security+2010 Code (markup): as a webdeveloper i will not accepte that ! but a client asked me that , i tried to convice him that dashes is more fit but i didn't got a result!
Oh, yeah, I guess you are right. Now that I think about it, it's common in a lot of affiliate links as well. But I still don't understand why it's so important to make such a monumental change in the way your blog functions. It's not going to give you any SEO boost or anything like that, so what's wrong with the way WP functions naturally?
Sorry, I can't help and I wouldn't even begin to let my clients do something like that. It has no bearing on anything SEO and what ever benefit they think it is going to provide for them is likely based on wrong or incomplete information. I know it's not what you asked, but I've been working with Wordpress for years and I don't see any practical reason to do something like this. To me it's a frivolous as changing all of your pages to .html A simple URL structure is the best way to go. Complicating things is only going to hurt them, not help...but then again, these days everyone thinks they have the new hot trick.
Funny, you seem determined to do things to your URL structure that are going to harm you. Usually characters aren't allowed because they are not supported by browsers. What characters are you trying to use? Do you just need a language pack? What language is the blog in and what language do you have it set up for?
the language is arabic and wordpress accept it 100% ex : i entered the following title : لا إله إلا الله Ù…ØÙ…د رسول الله good , but the slug always broke the title (لا-إله-إلا) just that !! so i want let him use ugly title like in english words ..
more details at http://en.support.wordpress.com/posts/post-title-url/ Code (markup): so i want keep lonk post titles evenif i use a non-western character like arabic , so please anyone can help me?
Ah ha! Now it's starting to make sense. Sorry I don't have a solution for that. Are you using Wordpress in English and trying to place Arabic in it or are you using Wordpress in Arabic? http://www.ar-wp.com/
You may have to try those forums to get an accurate answer. I know nothing about Arabic, Wordpress in Arabic or any of the symbols. In the future you may want to post that you are having problems with Worpdress Arabic...your problem is not simply about pluses and dashes as you titled it...it has more to do with the language and URL structure.
Then you have to use a non western translation, It seems that the problem is apparent...you are attempting to mix 2 different character sets.
i want just to know the function wich manage this operation and i'll take care of it ! when i add the title from the admin i don't know what's the process because all done by ajax so i can't follow the process so i wish really that someone can help me ..