织梦dedecms文章内容页去掉拼音标题后面的ID的方法

打开include/helpers/channelunit.helper.php,大约在194.195行

$articleRule = str_replace('{pinyin}',GetPinyin($title).'_'.$aid,$articleRule);
$articleRule = str_replace('{py}',GetPinyin($title,1).'_'.$aid,$articleRule);

修改为:

$articleRule = str_replace('{pinyin}',GetPinyin($title),$articleRule);
$articleRule = str_replace('{py}',GetPinyin($title,1),$articleRule);

也就是把画红圈的删除掉,保存。亲测有效!

THE END