Full Width Book Slider Shortcode

This shortcode generates a modern, full-width book slider. It is best suited for the Homepage Hero Section or a Featured Books area. It creates a split layout with the book content on one side and the cover image on the other.

Shortcode Name

[rswpbs_full_width_book_slider]


๐Ÿš€ How to Use

Basic Usage:

Displays the latest 10 books in a full-width slider format.

Code snippet

[rswpbs_full_width_book_slider]

Specific Books Usage:

Display only specific books by providing their IDs.

Code snippet

[rswpbs_full_width_book_slider book_ids="101,105,108"]

โš™๏ธ Attributes (Parameters)

You can control the content and visibility of elements using these attributes:

AttributeDefaultAccepted ValuesDescription
book_ids'' (Empty)Comma separated IDs (e.g., 12,15,19)Specify which books to display. If empty, it shows the latest 10 books.
read_more_textView DetailsStringCustom text for the secondary button (e.g., “Learn More”).
show_titletruetrue, falseShow or hide the book title.
show_authortruetrue, falseShow or hide the author name.
show_descriptiontruetrue, falseShow or hide the book excerpt (limited to 250 characters).
show_imagetruetrue, falseShow or hide the book cover image.
show_button_onetruetrue, falseShow or hide the primary “Buy” button.
show_button_twotruetrue, falseShow or hide the secondary “View Details” button.
slider_attr''String (Key=Value pairs)Advanced: Add custom HTML attributes to the slider wrapper. Format: data-speed=3000; data-autoplay=true.

๐Ÿ’ก Usage Examples

1. Hero Section (Curated List)

Display 3 specific best-selling books with a “Get it Now” button text.

Code snippet

[rswpbs_full_width_book_slider book_ids="50,60,70" read_more_text="Get it Now" show_description="true"]

2. Minimalist Slider

A clean slider showing only the Title, Image, and Buy Button (hiding author and description).

Code snippet

[rswpbs_full_width_book_slider show_author="false" show_description="false" show_button_two="false"]

3. Advanced Slider Configuration

If your JS library needs specific data attributes (like autoplay speed), pass them via slider_attr. Note the syntax: separate attributes with a semicolon (;).

Code snippet

[rswpbs_full_width_book_slider slider_attr="data-autoplay=true; data-speed=5000; data-arrows=false"]

๐Ÿ“ Developer Notes

  • Slider Attributes Parsing: The slider_attr parameter uses a custom parser. Ensure you use the format key=value; key=value. The code explodes the string by ; (semicolon + space) to generate HTML attributes.
  • Layout: The markup relies on Bootstrap-like classes (rswpbs-col-lg-8, rswpbs-col-lg-4). Ensure the parent container supports full width for the best visual effect.
  • Query: If book_ids is provided, the slider respects the order of IDs entered (orderby => post__in).

Was this article helpful?

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