0

Let's say I want to create a wordpress site that has a folder structure such as:

http://www.example.com/cars/
http://www.example.com/cars/red-cars/

Yet I want people to be able to comment on both the /cars/ and /red-cars/ pages. What is the easiest way to accomplish this?

I currently have /cars/ set as a category and output the category description in the page (to give it the illusion of an actual page and not just an archive listing) and /red-cars/ as a post, and this does accomplish part of what I want to do. But you can't possibly enable comments on an archive page as far as I can tell.

I would ideally like to have /red-car/ as a post and not a page, as there are going to be plugins used that need posts instead of pages. It's fine if the /cars/ part is a page, though.

1 Answer 1

1

It wouldn't work too smoothly since you are mixing "one of a thing" (which in WP usually means single post) and "many of a thing" (post or term archive).

Since comments are engineered to work with posts (pages are also kind of a post), the closest to this you can easily get is probably creating hierarchical Custom Post Type for this. Then /cars would be parent post and /cars/red-cars child, or something along these lines.

But then you won't really have logical place for its archives (which would be at /cars/ but then it won't have comments). Depends on your content really.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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