0

I have a wordpress website where I am using custom post types. I have an error on all single custom post type pages of one of the custom post type called products registered as portfolio. If I refresh the permalinks, it gets fixed and in few mins the 404 returns again. When I checked the rewrite rules it shows liks this:

When it loads properly:

products/([^/]+)(/[0-9]+)?/?$   index.php?portfolio=$matches[1]&page=$matches[2]

when 404 error :

[^/]+/([^/]+)/?$    index.php?attachment=$matches[1]

Any suggestions?

0

I found same problem and I solved with extraordinary article of Brent Shepherd : Advanced Taxonomy Queries with Pretty URLs. This article contains a generic function to solved the problem and instructions for changes permalinks. It's very important don't forget enable module php: mod_rewrite in your server and modify the archive /etc/apache2/sites-available/000-default.conf with rules: (for example in directory localhost, add)

 <Directory "/var/www/html">
AllowOverride All
</Directory>

and restart your server: sudo service apache2 restart This information explains in article HOW TO ENABLE MOD_REWRITE IN UBUNTU .Then follow the instructions above all permalinks work perfectly!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.