WordPress.org

Ready to get started?Download WordPress

Forums

Products in WP (4 posts)

  1. pintpint
    Member
    Posted 4 years ago #

    Hi,

    I want to add products to my WP site.
    That means I want to access data in a different database table and show this data on product pages. Products should have categories and one should be able to write posts about a product.

    I could just take any e-commerce-solution for WP, but I don't need all that functionality for selling and shopping cart and so on.

    Does anyone have a good recommendation for plugins that can manage such a thing?

    Thanks in advance!

  2. MichaelH
    Member
    Posted 4 years ago #

    One approach:

    Each product is a Page, and the Page uses a Custom Field to identify a 'product id'.

    You Write Posts about products, can categorize and tag as necessary those posts. Each post has a Custom Field as the 'product id'.

    Use scribu's Custom Field Taxonomies to give you easy access to pages and posts for a given 'product id'.

  3. pintpint
    Member
    Posted 4 years ago #

    Thanks Michael!

    Is there any tutorial or something that shows this?
    Or a plugin that allows linking in an external database table?

    Your approach would mean that I would have to stuff all my data inside the Pages, right?

    Would be better to leave data in existing product database tables...

  4. MichaelH
    Member
    Posted 4 years ago #

    Oops, sorry forgot to mention that if your product 'table' is in the same database that houses your WordPress tables, you can use the wpdb class to access that data.

    And yes you could use a Page Template to do that.

    Related:
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy
    Templates
    Custom Fields

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags