Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Issue with Remove slug post type error plugin WordPress


Hello I have the plugin "Remove Slug Custom post type error" that removes the 'portfolio-view' from

When I activate it it causes this error:

Remove Slug Custom post type error!
.htaccess is not writable, please add following lines to complete your installation:
RewriteRule ^/(.+)$ /$1 [R=301,L]
RewriteRule ^/(.+)$ /$1 [R=301,L]
RewriteRule ^slide-view/(.+)$ /$1 [R=301,L]
RewriteRule ^portfolio-view/(.+)$ /$1 [R=301,L]
RewriteRule ^/(.+)$ /$1 [R=301,L]

I have had 3 different people look at it but can't seem to fix it. The issue is that the existing links change correctly to but new portfolio posts I create 404 and can only be reached by going to But the existing posts are working corrrectly at

This is a problem I have been working on for days and no-one seems to be able to figure out why it 404's new listings.

Another strange thing is that the htaccess file does in fact contain the code that the plugin is saying is the issue, in fact that is all the plugin is actually doing is adding this line of code:

The htaccess file:

RewriteRule ^safecss/(.+)/$ /$1 [R=301,L]
RewriteRule ^/(.+)/$ /$1 [R=301,L]
RewriteRule ^slide/(.+)/$ /$1 [R=301,L]
RewriteRule ^portfolio/(.+)/$ /$1 [R=301,L]
RewriteRule ^/(.+)/$ /$1 [R=301,L]

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

I have put the entire suggested code in the htaccess and have the same issue.

Answers (6)


Manoj Raj answers:

can you paste the code used to generate your "custom post types" here?

liv comments:

<div id="content" class="grid_18">

<div id="gallery">

<ul class="portfolio">
<?php query_posts($query_string . '&orderby=rand') ?>


if ( get_query_var('paged') ) {

$paged = get_query_var('paged');

} elseif ( get_query_var('page') ) {

$paged = get_query_var('page');

} else {

$paged = 1;


query_posts( array( 'post_type' => 'portfolio', 'posts_per_page' => 12, 'paged' => $paged ) );

if ( have_posts() ) : $count = 0; while ( have_posts() ) : the_post(); $count++;

if(($i%3) == 0){ $addclass = "nomargin"; }



$content = get_the_content();

preg_match("#liveembed/([^?\"]+)#is", $content, $owned);

preg_match("/channel=([^\"]+)/is", $content,$twitch);

$isLive = 0;

if(isset($owned[1]) && $owned[1]!=""){
echo "own3d";
$xml = simplexml_load_file("".$owned[1]);
$live = $xml->liveEvent->isLive;
if($live == "true")

}else if(isset($twitch[1]) && $twitch[1]!=""){
$file = file_get_contents("".$twitch[1]);
$pos = strpos($file,"name");


<?php if($isLive): ?>
<li class="<?php echo $addclass; ?>">

<div class="folio-desc">
<div class="folio-desc-inner">

<h4><a href="<?php the_permalink(); ?>"><?php $title = the_title('','',FALSE); echo substr($title, 0, 40); ?></a></h4>

<time datetime="<?php the_time('Y-m-d\TH:i'); ?>"><?php the_time('m.d.Y'); ?></time>


<span class="image-border"><a class="image-wrap" href="<?php the_permalink() ?>" title="<?php _e('Permanent Link to', 'theme1418');?> <?php the_title_attribute(); ?>" ><?php the_post_thumbnail( 'portfolio-post-thumbnail' ); ?></a></span>

<?php endif;?>

liv comments:

any idea?

Manoj Raj comments:

Can you send me admin details through a personal Message? I will fix it... I sent you a PM already...

liv comments:

I sent you information.

Manoj Raj comments:

Got it.. Thank you.. Will have a look into it and let you know...


Michael Caputo answers:

Have you updated your permalinks in Settings > Permalinks?

liv comments:



Romel Apuya answers:

.htaccess is not writable, please add following lines to complete your installation:

well your htaccess file might not have the right file permission.
i guess its 644.

liv comments:

Didn't work.


Hardeep Singh answers:

I see difference in the .htaccess that is on top (in the error) and actual .htaccess printer below.

Please change:

RewriteRule ^portfolio/(.+)/$ /$1 [R=301,L]


RewriteRule ^portfolio-view/(.+)/$ /$1 [R=301,L]

And let me know the status now.

liv comments:

still 404s.

Hardeep Singh comments:

Please share a screen shot of edit post for a portfolio item.
One for new and one for existing.

I want to see the permalinks generated.

liv comments:

New post that 404s.