Custom Post Type Permalink Below Root Directory
-
I have wordpress installed in the /blog/ directory on my web server, so the WordPress homepage is at, for example http://www.example.com/blog/
I am creating some custom post types for content management. I would like the URL for the “product” custom type to be http://www.example.com/product/… and for the “people” custom type to be http://www.example.com/people/…
Now server side this is simple. The problem is making WordPress generate (rewrite) the permalinks so they are below the WordPress Installation/Root directory (/home/site/public_html/blog -> http://www.example.com/blog/).
I could do if by using PHP output buffers to search-n-replace so that the string “http://www.example.com/blog/product” is replaced with “http://www.example.com/product”, but that is messy and will use up a lot more RAM. If there is an official or correct non-hacky way to do this, I would much rather do that.
Does anyone know how to do this?
- The topic ‘Custom Post Type Permalink Below Root Directory’ is closed to new replies.