Author Pro Book Gallery Block

The Author Pro Book Gallery block is a powerful Gutenberg block designed to display your book collection dynamically. It features a responsive sidebar with advanced filters (Genre, Author, Series, Price, etc.), AJAX-based “Load More” or pagination, and built-in WooCommerce integration for seamless book sales.

Shortcode vs. Block

Unlike the shortcodes mentioned earlier, this is a native Gutenberg Block. It provides a visual interface in the editor, allowing you to toggle settings and see changes instantly without writing code.


๐Ÿš€ How to Use

  1. Open the WordPress Page/Post editor.
  2. Click the + (Plus) icon to add a new block.
  3. Search for “Book Gallery [Author Pro]” and insert it.
  4. The gallery will appear with default books. Use the Block Settings sidebar (on the right) to customize it.

โš™๏ธ Block Settings (Sidebar Controls)

When you select the block, you will see the following configuration panels in the right sidebar:

1. Main Settings

  • Show Sidebar: Toggle the filter sidebar on/off. If disabled, the gallery becomes full-width.
  • Main Book Page URL: Enter the URL of your main library page. This adds a “Back to All Books” link in the sidebar when a user is filtering deep into a category.
  • Books Per Page: Controls how many books are loaded initially (slider range: 3 to 24).

2. Layout Settings

  • Show Sorting Options: Enable/Disable the “Sort By” dropdown (Newest, Price, Top Rated) at the top of the gallery.
  • Books Per Row (Desktop): Adjust the grid layout columns (2, 3, or 4 columns).
  • Pagination Style: Choose between:
    • Numeric Pagination: Standard page numbers (1, 2, 3…)
    • Load More Button: A button that loads more books below the existing list without refreshing.

3. Filter Visibility

(Only visible if “Show Sidebar” is enabled)

You can toggle which filters appear in the sidebar for your users:

  • Taxonomy Filters: Genre, Author, Series.
  • Meta Filters: Format (Hardcover/Ebook), Language, Publisher, ISBN, Price Range, Year, Reading Age, Rating.

๐ŸŽจ Key Features

1. Advanced Sidebar Filters

  • Multi-Select: Users can select multiple genres or authors at once (e.g., “Fantasy” AND “Adventure”).
  • Smart Dropdowns: Filters are collapsible dropdowns with a search bar inside each, making it easy to find specific options.
  • Mobile Optimized: On mobile devices, the sidebar turns into a slide-out drawer for a better user experience.

2. AJAX & Live Updates

  • No Reloads: Searching, filtering, sorting, and pagination happen instantly without reloading the page.
  • Dynamic Results Count: The “Showing X-Y of Z Results” text updates automatically as you filter.

3. WooCommerce Integration

  • Direct “Add to Cart”: Displays an “Add to Cart” button directly on the book card if linked to a WooCommerce product.
  • Sale Badges: Automatically calculates and shows savings percentage (e.g., “Save 20%”) if a sale price exists.
  • Button Animation: When a user adds a book to the cart, a “View Cart” button appears smoothly for a few seconds, guiding them to checkout.

๐Ÿ“ Developer Notes

  • Context Awareness: If placed on a Taxonomy Archive page (e.g., inside a “Genre” archive template), the block automatically detects the current category and locks the filter to that specific genre.
  • Unique ID: Each block generates a unique ID (e.g., awt-book-gallery-xyz), allowing multiple galleries on the same page without conflict.
  • Custom Icons: The block uses inline SVG icons for stars, arrows, and UI elements, ensuring fast loading without external font dependencies.

Was this article helpful?

© 2026 RS WP Book Showcase. Built with โค๏ธ for authors.