[Plugin: Remove slug from custom post type] Last character stripped when using suffix
-
Hi, I got the last character stripped when using a suffix.
So, if we have a slug something and a suffix html, we end up with an url like somethin.html.
I’m using
/%postname%.html
globally.I hope this can be solved changing line 124 and 125 of file remove-slug-custom-post-type.php:
if (!empty($suffix)) $permalink = substr($permalink, 0, -1) . ".{$suffix}";
To:
if( !empty($suffix) ) if( substr($permalink, -1) == '/' ) $permalink = substr($permalink, 0, -1) .'.'. $suffix; else $permalink = $permalink .'.'. $suffix;
Best. ??
https://www.ads-software.com/extend/plugins/remove-slug-from-custom-post-type/
- The topic ‘[Plugin: Remove slug from custom post type] Last character stripped when using suffix’ is closed to new replies.