Activate DK Base Plugin and DK Epub Previewer. Upload an EPUB sample to the WordPress Media Library and note its attachment ID. Use a sample file containing only the material you want visitors to access.
Open DK Plugins > Epub Previewer to set normal and hover background, text, and border colors. Save your changes and refresh the page containing the preview button. Delete Data On Uninstall controls removal of plugin settings when uninstalling.
Add [dk_epub_previewer media_id="123"] to a Shortcode block or another shortcode-capable field. Replace 123 with the EPUB attachment ID, not its URL.
Use [dk_epub_previewer product_id="456"] with WooCommerce and DK WC Books active. The product's associated Book record must have an EPUB sample. If no start location is supplied, the Book record's EPUB start location is used.
Use either media_id or product_id, never both. Optional start_location="chapter01.xhtml" selects an internal EPUB location; omit it to use the normal starting position. The location must exist in that EPUB.
The plugin also registers [dk_pdf_downloader media_id="789"] for a PDF attachment. It creates a download button; it does not open the EPUB reader.
Check the numeric attachment ID, accessible file URL, and the EPUB MIME type application/epub+zip. For product-based previews, verify the product-to-Book association and EPUB sample field. For PDF downloads, use a PDF attachment.
Do not supply both IDs. If the reader opens at the wrong location, remove start_location to test the beginning, then verify the exact internal file path. Clear page caches after changing settings or files.