AJAX RS WP Book Showcase Shortcode
The [rs_wp_book_showcase_ajax] shortcode is the core feature of the RS WP Book Showcase plugin. It allows you to display a fully responsive, AJAX-powered book grid or list with advanced filtering, searching, and sorting capabilities.
This shortcode is designed to load content dynamically without refreshing the page, providing a seamless user experience for your visitors.
Basic Usage
To display the book showcase with default settings, simply add the following shortcode to any page or post:
[rs_wp_book_showcase_ajax]
Configuration Parameters
You can customize the appearance and functionality of the showcase using various attributes. Below is a detailed breakdown of all available parameters.
1. General Settings
Control the core functionality of the grid, such as search forms and pagination.
| Attribute | Accepted Values | Default | Description |
show_search_form | true, false | true | Displays the advanced search filter bar above the book grid. |
show_sorting_form | true, false | true | Displays the “Sort By” dropdown (Price, Title, Date) and result count. |
show_load_more_btn | true, false | true | Shows a “Load More” button for pagination instead of standard page numbers. |
books_per_page | Integer (e.g., 8, 12) | 8 | The number of books to load initially and per “Load More” click. |
load_in_modal | true, false | true | If true, clicking a book opens a quick-view popup. If false, it redirects to the single book page. |
2. Book Information Display
Control which elements are visible for each book card.
| Attribute | Accepted Values | Default | Description |
show_image | true, false | true | Displays the book cover image. |
show_title | true, false | true | Displays the title of the book. |
show_author | true, false | true | Displays the author’s name. |
show_price | true, false | true | Displays the book price (requires WooCommerce). |
show_excerpt | true, false | true | Shows a short description of the book. |
excerpt_limit | Integer | 60 | Limits the number of words displayed in the excerpt. |
show_buy_button | true, false | true | Displays the external/affiliate buy button. |
show_add_to_cart_btn | true, false | false | Displays the WooCommerce “Add to Cart” button directly in the grid. |
show_read_more_button | true, false | false | Adds a “Read More” button linking to the book details. |
show_msl | true, false | true | Displays Multiple Sales Links (Amazon, B&N, etc.) if configured in the Pro version. |
3. Layout & Styling
Customize the visual arrangement and alignment of the books.
| Attribute | Accepted Values | Default | Description |
layout | default | default | The base layout style. |
image_position | top, left, right | top | Controls where the image sits relative to the text. • top: Standard Grid view.• left/right: Creates a List view layout. |
content_align | center, left, right | center | Aligns the text content inside the book card. |
show_masonry_layout | true, false | true | Enables Masonry layout (staggered grid). Note: Only works if height_stretch is set to false. |
height_stretch | true, false | true | Forces all book cards in a row to have the same height. |
lazy_load_images | true, false | true | Enables lazy loading for book covers to improve page speed. |
4. Responsive Grid Settings
Control how many books appear per row on different screen sizes.
| Attribute | Value | Default | Screen Size Target |
books_per_row | 1, 2, 3, 4, 6 | 3 | Large Screens (Desktop, ≥ 992px) |
books_per_row_laptop | 1, 2, 3, 4, 6 | 3 | Laptops (≥ 768px and < 992px) |
books_per_row_tablet | 1, 2, 3, 4, 6 | 2 | Tablets (≥ 576px and < 768px) |
books_per_row_mobile | 1, 2, 3, 4, 6 | 1 | Mobile Phones (< 576px) |
5. Advanced & Performance
| Attribute | Accepted Values | Default | Description |
enable_cache | true, false | true | Caches the query results to reduce database load and improve speed. |
search_fields_col | 1 to 4 | 4 | Determines the number of columns in the advanced search form layout. |
Examples
Example 1: Standard Grid View
A classic 4-column grid with search and sorting enabled.
[rs_wp_book_showcase_ajax books_per_row="4" show_search_form="true"]
Example 2: List View (Image on Left)
Best for detailed book lists where descriptions are important.
[rs_wp_book_showcase_ajax image_position="left" content_align="left" books_per_row="1" books_per_row_laptop="1"]
Example 3: Minimalist Store
Hides excerpts and search forms for a clean look, focusing on images and buy buttons.
[rs_wp_book_showcase_ajax show_search_form="false" show_excerpt="false" show_sorting_form="false" content_align="center"]
Example 4: Performance Optimized
For large catalogs, ensure caching and lazy load are active (enabled by default, but good to know).
[rs_wp_book_showcase_ajax enable_cache="true" lazy_load_images="true" books_per_page="12"]
Was this article helpful?