• I’ve tried to slice & dice my search terms in Google and here in the wordpress plugins area looking for a plugin that will allow me to build tables of data derived from Posts that would appear within a Page based on a very specific shortcode. I want to be able to include within the table not only the post title and other “preset” Post data fields, but I also want to include other data that’s held within the custom fields contained within the post.

    Example… For every product in my inventory I create a Post. I assign each product to a single Post category based on the type of product it is (i.e. apple, orange, banana, etc). I use custom fields to assign properties that are common to all products in my inventory (i.e. weight, color) but differ slightly from product-to-product. For instance, the weight of one product is slightly different than the weight of another.

    Eventually (and this is the sticking point) I want to create a Page where I can place a table that lists all the Posts from a single category but that also produces columnar data based on the contents of the custom fields associated with that item.

    In the example below I would have a Page titled “Apples” with some descriptive text. Below the descriptive text I would drop a short-code (something like [ItemTable category=”apples” columns=”Post_Title,Weight,Color”]) that would generate a custom table based on info found in the Post.

    Apples
    
    Apples are great for you!  Here's a list of some of the apples we have in stock.
    
    PostTitle  | Weight | Color
    Gala Apple | 5.7    | Variegated Yellow and Red
    Red Apple  | 2.1    | Red
  • The topic ‘Posts as Tables in Pages’ is closed to new replies.