A custom Page Template was developed in order to display a list of products.

A WordPress page (/products) was created and the template was applied to it. There is a database which the template's programming accesses to retrieve product information. Different products are displayed based on a GET querystring variable, "Id" (/products?Id=1).

Comments are enabled on the /products page, so when users are viewing different products, they can comment. The issue here is that the comments are common to the products page. When a user comments on the product with Id = 1, the comment is displayed on all other product pages (Id = 2, 3, etc). Optimally, we would want each product to have it's own set of comments.

What's the easiest way to implement the desired functionality on the products page?

1 Answer 1


I don't know of a way to do that short of creating your own comment tracking system.

Probably the easiest way to use Wordpress's functionality would be to make a "projects" custom post type and use custom fields to store product information like the id etc. This would allow commenting on each product and you could use get_posts to display all posts of type product on your projects page.

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.