Remove slug from custom post type
Last character stripped when using suffix (1 post)

  1. Raul Illana
    Posted 4 years ago #

    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}";


    if( !empty($suffix) )
    if( substr($permalink, -1) == '/' )
    $permalink = substr($permalink, 0, -1) .'.'. $suffix;
    else $permalink = $permalink .'.'. $suffix;

    Best. :)


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Remove slug from custom post type
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic