WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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