DK Book & Format Details Tables Docs

DK Book & Format Details Tables turns WooCommerce product attributes into configurable Book Details and Format Details displays. Use this guide to configure the displays and add them to your content with a shortcode. If you still need help or would like to request a feature or enhancement, please email me.

What the Plugin Does

The shortcode can render two coordinated displays from one or more WooCommerce products:

  • Book Details shows the selected information shared across the book's products, such as author, series, dimensions, weight, SKU, or other WooCommerce product attributes.
  • Format Details shows a separate entry for each format or variation, such as eBook, paperback, hardcover, or audiobook, with the selected details for that format.

You can display both sections together or either section independently.

Requirements and Initial Setup

WooCommerce and DK Base Plugin must be installed and active. DK Base Plugin supplies the shared product-search, format-attribute, language, and plugin-management settings used by this plugin.

  1. Open DK Plugins > Book & Format Details Tables.
  2. On Book Details Table Settings, select the shared attributes to display and choose the heading, text, background, border color, and border width.
  3. On Format Details Table Settings, select the format-specific attributes and customize the odd and even rows. Enable Include Extra Variation Attributes if variation metadata supplied by DK Base Plugin should also appear.
  4. Click Save Changes. The examples below the form preview the selected colors and borders.

The available attribute lists come from WooCommerce global attributes and visible product-specific attributes. Dimensions, SKU, and weight are also available. The format heading comes from the Format Attribute configured in DK Base Plugin.

Adding the Shortcode

Add [dk_book_details_by_format] to a page, post, or another content area that supports WordPress shortcodes. Identify the book with either product_ids or book_title, but not both.

Use Product IDs

Pass one or more WooCommerce product IDs as a comma-separated list:

[dk_book_details_by_format product_ids="123, 124, 125"]

Use a Book Title

Search the product title within the product categories configured by DK Base Plugin:

[dk_book_details_by_format book_title="Your Book Title"]

Use a title that consistently identifies the related formats. Product IDs are the more precise choice when title search could match unrelated products.

Shortcode Options

  • product_ids: Comma-separated WooCommerce product IDs. Use this or book_title.
  • book_title: Text used to find related WooCommerce products. Use this or product_ids.
  • table: Use all, book, or formats. The default is all; an unrecognized value also falls back to all.
  • language: Requests a language supported by the DK Base Plugin language-to-locale mapping. The default is English.

For example, show only Format Details in German:

[dk_book_details_by_format book_title="Your Book Title" table="formats" language="German"]

Products, Variations, and Visibility

Simple products are displayed directly. Variable products are expanded into their individual variations for Format Details. Published products are available to visitors. Logged-in users who can edit pages can also preview scheduled products and, when Show Private Results When Logged In is enabled in DK Base Plugin, private products.

If the shortcode is invalid or no products match, visitors see no output. If no attributes are selected, they see a No Data Found message. Logged-in users who can edit pages receive a more specific diagnostic message.

Deactivation and Uninstall

Deactivating the plugin keeps its settings. Uninstalling also keeps them by default. To remove the plugin's saved settings during uninstall, enable Delete Data On Uninstall on the General Plugin Settings tab before uninstalling.

Troubleshooting

  • Nothing appears: Confirm that exactly one of product_ids or book_title is present and that the matching products are visible to the current visitor.
  • A title search finds no products: Check the spelling and confirm that the products belong to a product category searched by DK Base Plugin. Use product IDs when you need an exact selection.
  • A format heading is blank: Confirm that DK Base Plugin's Format Attribute matches the WooCommerce attribute used by the products or variations.
  • An attribute is missing from the settings list: Make sure the WooCommerce attribute exists and that product-specific attributes are marked visible.
  • A language warning appears: Use a language recognized by the DK Base Plugin language mapping or omit language to use the default.