2

I want to display the url's like this:

for Category: /webshop/categories/hoodies/

for products:

/webshop/categories/hoodies/test-product

how is this possible without giving me 404 not found

thanks

1

Got to Settings -> Permalinks -> In 'Product permalink base' select the 'Shop base with category' option.

After saving if the .htaccess file is not writable then WordPress prompts you to create the .htaccess file and add the code which the mention after saving in the .htaccess file.

The reason that it is giving 404 error is that the Permalink structure needs the code to be added to .htaccess file or the settings which you saved will only apply when not using "default" permalinks for 'Common Settings'.

1

This is solution of your 404 links problem,

Got to Settings -> Permalinks -> In 'Product permalink base' select the 'Shop base with category' option. For more you can visit, https://wordpress.org/support/topic/permalinks-404-with-custom-post-type

1

404 Possible Error Cases with Permalinks

  • check your apache config and make sure the directory is right. restart the apache process along with MYSQL/similar.
  • make sure mod_rewrite is enabled

Apache mod_rewrite for Ubuntu/Debian:

sudo a2enmod rewrite
sudo service apache2 restart

Similliar to mod_rewrite for Nginx by .htaccess:

a simpler way is .htaccess converter for Nginx. also check nginx rewite docs.

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.