1

I have a site displaying posts on 2 parent pages: Blog and Ask Anything. They are both using the default WordPress post, but the blog displays all categories excluding "Ask Anything", and the Ask Anything page displays only that category.

Is it possible for the blog posts to have the URL of "blog/postname", and the Ask Anything posts to have the URL of "ask-anything/postname"?

Maybe this is a job for wp_rewrite, but I haven't found the solution yet. This question seemed promising, but I didn't see any change in my URL's. Currently the permalinks are set to a custom structure of andrewarthur.info/dev/blog/%postname%/.

Note: I originally set out to make the Ask Anything posts a custom post type, which would solve this whole issue. There are many solutions I found that addressed custom taxonomy. But I was having difficulty displaying a list of the custom posts, and the project timeline won't allow for further development in that direction just yet.

You can check out the site here for reference.

  • 1
    using a custom post type is far easier than what you're asking for, not sure why you had issues with that. – Milo May 17 '16 at 4:07
  • @Milo I was having trouble displaying a list with the custom post type category. If anyone could point me in the right direction for how to achieve that, I would try it again. – char May 17 '16 at 6:36
  • if it's just a custom post type, I'm not sure how categories would be involved. register a post type and set has_archive to ask-anything, go to domain.com/ask-anything/ and you will see your list of posts. – Milo May 17 '16 at 15:20

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.