Demo for example:

  • my-site.com/shop-virtual/ - Listing all posts of Post type "Products".
  • my-site.com/shop-virtual/products/category - Listing all posts of Category.
  • my-site.com/shop-virtual/products/category/my-product-single - Single post

/shop-virtual/ this is custom page with loop for post_type 'products'.

Currently looks like this:

  • my-site.com/shop-virtual/ - page list
  • my-site.com/category/my-category - For categories is thus with base categories of wp.
  • my-site.com/products/my-product - this is single page of unique product.

I tried to use the 'rewrite' the 'register_post_type' that way down but it did not work

register_post_type( 'products', array(
    'rewrite' => array("slug" => "shop-virtual/products", "with_front" => false),
) );
  • see this answer. – Milo Sep 27 '13 at 17:39
  • But this works for normal category of wordpress? – Raank Sep 27 '13 at 17:57

Your Answer

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

Browse other questions tagged or ask your own question.