Ask your WordPress questions! Pay money and get answers fast! (more info)



is possible to have a permalink / id / without point changes with the -

regards cristian

Answers (4)


Jurre Hanema answers:

Try dropping this into your functions.php:

remove_filter( 'sanitize_title', 'sanitize_title_with_dashes');
add_filter('sanitize_title', 'wpq_sanitize_title');

function wpq_sanitize_title($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);

if (seems_utf8($title)) {
if (function_exists('mb_strtolower')) {
$title = mb_strtolower($title, 'UTF-8');
$title = utf8_uri_encode($title, 200);

$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;

This allows points in the post name and takes effect on all newly published posts.


Kannan C answers:


This will work only for posts

crisdany6 comments:

I try to be more clear

if the title and " and a classifieds website"
must be / 4 /
changing RewriteRule...


MDan answers:

You can try add this rewrite rule to your .htaccess file:

RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_URI} !..+$
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1/ [R=301,L,QSA]

You should backup your current .htaccess file before!

Additionaly you should read this post:


ej_emman answers:

hello crisdany6,

It was not really clear for me, of what you really want to happen but I get some Idea on you second demotion.
Maybe you just need this. placing it to your permalink custom structure.