Loading...
Hot as hell, this is the top-bar widget Link

bs Swiper

Excerpt

Overview

Requires the bs Loop plugin.

text

Installation

  1. Download Plugin
  2. In your admin panel, go to Plugins > and click the Add New button.
  3. Click Upload Plugin and Choose File, then select the Plugin’s .zip file. Click Install Now.
  4. Click Activate to use your new Plugin right away.

Shortcode

All bs Loop attributes are supported, except row-cols-* and gap. The following attributes are added by bs Swiper:

Display

AttributeDescriptionDefault
display=""Required to enable Swiper 
display="swiper"
N/A

Slides per View

Replaces row-cols-* from bs Loop.

AttributeDescriptionDefault
slides_per_view=""Number of visible slides. Single value for all breakpoints: slides_per_view="3".
Comma-separated values per Bootstrap breakpoint (xs,sm,md,lg,xl,xxl): slides_per_view="1,1,2,3,4,4".

Peek effect — use fractional values:
slides_per_view="1.5" shows 1 full slide + 0.5 of the next.
slides_per_view="1.5,1.5,2.5,3.5,4.5,4.5" with breakpoints.
horizontal/overlay: 1,1,1,1,1,1
grid: 1,1,2,3,4,4
slides_per_view_auto=""true to auto-calculate based on slide widthfalse
slides_per_group=""Number of slides to advance per swipe. Single value: slides_per_group="3".
Comma-separated per breakpoint: slides_per_group="1,1,2,3,3,4"
1

Gap & Offset

Replaces gap from bs Loop.

AttributeDescriptionDefault
space_between=""Gap between slides in px24
slides_offset_before=""Left padding in px before first slide
slides_offset_before="50"
0
slides_offset_after=""Right padding in px after last slide
slides_offset_after="50"
0
AttributeDescriptionDefault
navigation=""false to hide navigation arrowstrue
nav_position=""outside — arrows outside slides (no overlap)
inside — arrows inside slides (overlap)
grid/horizontal: outside
overlay: inside
nav_wrapper_class=""Bootstrap/utility classes for the outer navigation wrapper (only when nav_position="outside")
Example: nav_wrapper_class="p-0 px-lg-5"
px-5
nav_button_class=""Bootstrap/utility classes for navigation buttons
Example: nav_button_class="d-none d-lg-block"
""

Pagination

AttributeDescriptionDefault
pagination=""false to hide pagination bulletstrue
pag_position=""outside — bullets below slides
inside — bullets inside slides
grid/horizontal: outside
overlay: inside
pag_wrapper_class=""Bootstrap/utility classes for the pagination wrapper (only when pag_position="outside")
Example: pag_wrapper_class="mt-4"
""
pag_class=""Bootstrap/utility classes for pagination bullets
Example: pag_class="d-none d-md-block"
""

Behavior

AttributeDescriptionDefault
loop=""true to enable infinite loopfalse
centered_slides=""true to center the active slidefalse
free_mode=""true to scroll freely without snapping to slidesfalse
autoplay=""true to enable autoplayfalse
delay=""Autoplay delay in milliseconds3000
speed=""Slide transition speed in milliseconds300

Effects

AttributeDescriptionDefault
effect=""Single-slide effects (require slides_per_view="1"):
fade – cross-fade
cube – 3D cube rotation
flip – 3D flip
cards – card stack
creative – custom creative transitions

Multi-slide effects:
slide – default sliding transition
coverflow – 3D coverflow
slide

Examples

Posts

Posts by category

[bs-loop display="swiper" type="post" tax="category" terms="sample-cat-2, sample-cat-2"]

Overlay

text

[bs-loop display="swiper" layout="overlay" nav_button_class="d-none d-lg-block" effect="creative" context="hide-category hide-meta hide-tags hide-read-more" type="post" tax="category" terms_parent="25, 28"]
Peek Effect

text

[bs-loop display="swiper" layout="overlay" nav_button_class="d-none d-lg-block" pag_position="outside" space_between="16" slides_per_view="1.5" context="hide-category hide-meta hide-tags hide-read-more" type="post" tax="category" terms_parent="25, 28"]

Responsive nav arrows (inside below lg)

[bs-loop display="swiper" nav_wrapper_class="p-0 px-lg-5" pag_class="d-none d-lg-block" type="post" tax="category" terms_parent="25, 28" loop="true" effect="creative" autoplay="true" delay="4000" speed="1000"]

Pages

text

WooCommerce

text

Products

[bs-loop display="swiper" layout="grid" type="product" tax="product_cat" terms="plugins, t-shirts" slides_per_view="1,1,2,3,3,3" slides_per_group="1,1,2,3,3,3"]

Taxonomies

Product cat
[bs-loop display="swiper" slides_per_view="1,2,2,2,2,2" type="product_cat" id="31, 34"]

Custom

Tailwind-style loop cards

[bs-loop display="swiper" layout="custom" context="swiper-tailwind-style-loop-cards" tax="category" terms_parent="47" slides_per_view="1,1,2,3,3,3"]
/**
 * Custom Swiper Loop Item for `bs-loop layout="custom" context="swiper-tailwind-style-loop-cards"`
 * This only affects the shortcode, not theme templates
 */

// Change tags badge class only in specific context
function swiper_tailwind_change_tags_badge($class) {
  // Check if the context exists and matches
  if (isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-tailwind-style-loop-cards', $GLOBALS['bs_loop_contexts'])) {
    return 'custom-tag badge bg-dark bg-opacity-25 backdrop-blur-10 text-white rounded-pill fw-lighter p-2 text-decoration-none';
  }
  return $class;
}
add_filter('bootscore/class/badge/tag', 'swiper_tailwind_change_tags_badge');

// Change category badge
function swiper_tailwind_change_category_badge($class) {
  if (isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-tailwind-style-loop-cards', $GLOBALS['bs_loop_contexts'])) {
    return 'small text-body-secondary text-uppercase fw-lighter text-decoration-none';
  }
  return $class;
}
add_filter('bootscore/class/badge/category', 'swiper_tailwind_change_category_badge');

/**
 * Open swiper wrapper before loop
 */
function swiper_tailwind_before_loop() {
  if (isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-tailwind-style-loop-cards', $GLOBALS['bs_loop_contexts'])) {
    echo '<div class="swiper-wrapper bs-loop-grid">';
  }
}
add_action('bootscore_before_loop', 'swiper_tailwind_before_loop');


/**
 * Open swiper slide before loop item
 */
function swiper_tailwind_before_loop_item() {
  if (isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-tailwind-style-loop-cards', $GLOBALS['bs_loop_contexts'])) {
    echo '<div class="swiper-slide h-auto bs-loop-grid-item">';
  }
}
add_action('bootscore_before_loop_item', 'swiper_tailwind_before_loop_item');


/**
 * Custom Loop Item - The actual card
 */
add_action('bootscore_custom_loop_item', function($context) {
  if ($context === 'custom' && isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-tailwind-style-loop-cards', $GLOBALS['bs_loop_contexts'])) {
    ?>
      <article class="card shadow h-100 rounded-5">
        
        <?php if ( has_post_thumbnail() ) : ?>
          <a class="pt-2 px-2" href="<?php the_permalink(); ?>" aria-hidden="true" tabindex="-1">
            <?php the_post_thumbnail('medium', array('class' => 'card-img', 'style' => 'border-radius: calc(var(--bs-border-radius-xxl) - 0.5rem);')); // border-radius-xxl - inner-padding p-2 ?>
          </a>
          <div class="position-absolute top-0 start-0 mt-4 ms-4 small">
            <?php bootscore_tags(); ?>
          </div>
        <?php endif; ?>
        
        <div class="card-body p-4 d-flex flex-column">
          
          <?php bootscore_category_badge(); ?>
          
          <?php the_title('<h2 class="h5">', '</h2>'); ?>

          <p class="card-text small fw-lighter">
            <?= esc_html(wp_strip_all_tags(get_the_excerpt())); ?>
          </p>

          <p class="card-text d-flex align-items-center mt-auto">
            <?php if ('post' === get_post_type()) : ?>
              <span class="small text-body-secondary fw-lighter w-100">
                <i class="fa-regular fa-calendar"></i> <?php bootscore_date();?>
              </span>
            <?php endif; ?>
            <a class="btn btn-sm btn-dark rounded-pill shadow w-100" href="<?php the_permalink(); ?>">
              Learn more <i class="fa-solid fa-arrow-right"></i>
            </a>
          </p>

        </div>
        
      </article>
    <?php
  }
});


/**
 * Close swiper slide after loop item
 */
function swiper_tailwind_after_loop_item() {
  if (isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-tailwind-style-loop-cards', $GLOBALS['bs_loop_contexts'])) {
    echo '</div>';
  }
}
add_action('bootscore_after_loop_item', 'swiper_tailwind_after_loop_item');


/**
 * Close swiper wrapper after loop
 */
function swiper_tailwind_after_loop() {
  if (isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-tailwind-style-loop-cards', $GLOBALS['bs_loop_contexts'])) {
    echo '</div>';
  }
}
add_action('bootscore_after_loop', 'swiper_tailwind_after_loop');

Custom Overlay cards

[bs-loop display="swiper" layout="custom" context="swiper-overlay-cards" tax="category" terms_parent="47" slides_per_view="1,1,2,3,3,3"]
/**
 * Custom Swiper Loop Item for `bs-loop layout="custom" context="swiper-overlay-cards"`
 * This only affects the shortcode, not theme templates
 */

// Change tags badge class only in specific context
function swiper_overlay_change_tags_badge($class) {
  // Check if the context exists and matches
  if (isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-overlay-cards', $GLOBALS['bs_loop_contexts'])) {
    return 'custom-tag badge bg-dark bg-opacity-25 backdrop-blur-10 text-white rounded-pill fw-lighter p-2 text-decoration-none';
  }
  return $class;
}
add_filter('bootscore/class/badge/tag', 'swiper_overlay_change_tags_badge');


/**
 * Open swiper wrapper before loop
 */
function swiper_overlay_before_loop() {
  if (isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-overlay-cards', $GLOBALS['bs_loop_contexts'])) {
    echo '<div class="swiper-wrapper bs-loop-grid">';
  }
}
add_action('bootscore_before_loop', 'swiper_overlay_before_loop');


/**
 * Open swiper slide before loop item
 */
function swiper_overlay_before_loop_item() {
  if (isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-overlay-cards', $GLOBALS['bs_loop_contexts'])) {
    echo '<div class="swiper-slide h-auto bs-loop-grid-item">';
  }
}
add_action('bootscore_before_loop_item', 'swiper_overlay_before_loop_item');


/**
 * Custom Loop Item - The actual card
 */
add_action('bootscore_custom_loop_item', function($context) {
  if ($context === 'custom' && isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-overlay-cards', $GLOBALS['bs_loop_contexts'])) {
    ?>
      <article class="card border-0 shadow bg-dark h-auto rounded-4 overflow-hidden">
        
        <?php the_post_thumbnail('medium', array('class' => 'card-img')); ?>

        <div class="position-absolute top-0 start-0 mt-3 ms-3 small">
          <?php bootscore_tags(); ?>
        </div>
        
        <div class="card-img-overlay d-flex flex-column">

          <a class="text-decoration-none mt-auto stretched-link" href="<?php the_permalink(); ?>">
            <?php the_title('<h2 class="text-white h3 lh-1 fw-bold">', '</h2>'); ?>
          </a>
          
          <div class="custom-card-overlay-meta d-flex align-items-center gap-2 mt-2 text-white">
            <p class="card-text d-flex align-items-center mt-auto w-100">
              <span class="author-avatar me-auto">
                <?php echo get_avatar(get_the_author_meta('ID'), 32, '', '', array('class' => 'rounded-circle border border-white shadow')); ?>
              </span>
              <span class="small text-white">
                <i class="fa-regular fa-calendar"></i> <?php bootscore_date();?>
              </span>
            </p>
          </div>
          
        </div>
        
      </article>
    <?php
  }
});


/**
 * Close swiper slide after loop item
 */
function swiper_overlay_after_loop_item() {
  if (isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-overlay-cards', $GLOBALS['bs_loop_contexts'])) {
    echo '</div>';
  }
}
add_action('bootscore_after_loop_item', 'swiper_overlay_after_loop_item');


/**
 * Close swiper wrapper after loop
 */
function swiper_overlay_after_loop() {
  if (isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-overlay-cards', $GLOBALS['bs_loop_contexts'])) {
    echo '</div>';
  }
}
add_action('bootscore_after_loop', 'swiper_overlay_after_loop');

Minimal product loop

[bs-loop display="swiper" layout="custom" context="swiper-minimal-product-loop" type="product" tax="product_cat" terms="plugins, t-shirts" slides_per_view="1,1,2,3,3,3" load_more="true" posts="4"]
/**
 * Custom Swiper Loop Item for `bs-loop layout="custom" context="swiper-minimal-product-loop"`
 * This only affects the shortcode, not theme templates
 */

/**
 * Replace add to cart button with icon in minimal product loop context
 */
add_filter('woocommerce_loop_add_to_cart_link', function ($button, $product, $args) {
  if (!isset($GLOBALS['bs_loop_contexts']) || !in_array('swiper-minimal-product-loop', $GLOBALS['bs_loop_contexts'])) {
    return $button;
  }

  $icon = '<i class="fa-solid fa-bag-shopping"></i>';
  if ($product->is_type('variable')) {
    $icon = '<i class="fa-solid fa-cart-shopping"></i>';
  } elseif ($product->is_type('external')) {
    $icon = '<i class="fa-solid fa-arrow-up-right-from-square"></i>';
  }

  return sprintf(
    '<a href="%s" data-quantity="%s" class="%s" %s>%s</a>',
    esc_url($product->add_to_cart_url()),
    esc_attr(isset($args['quantity']) ? $args['quantity'] : 1),
    esc_attr(isset($args['class']) ? $args['class'] : 'button'),
    isset($args['attributes']) ? wc_implode_html_attributes($args['attributes']) : '',
    $icon
  );
}, 10, 3);


/**
 * Temporarily override the add to cart button class.
 * Named function required so remove_filter() can actually find and remove it.
 */
function swiper_minimal_product_loop_add_to_cart_class($classes) {
  return 'btn btn-sm btn-primary';
}


/**
 * Open swiper wrapper before loop
 */
function swiper_minimal_product_loop_before_loop() {
  if (isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-minimal-product-loop', $GLOBALS['bs_loop_contexts'])) {
    echo '<div class="swiper-wrapper bs-loop-grid">';
  }
}
add_action('bootscore_before_loop', 'swiper_minimal_product_loop_before_loop');


/**
 * Open swiper slide before loop item
 */
function swiper_minimal_product_loop_before_loop_item() {
  if (isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-minimal-product-loop', $GLOBALS['bs_loop_contexts'])) {
    echo '<div class="swiper-slide h-auto bs-loop-grid-item">';
  }
}
add_action('bootscore_before_loop_item', 'swiper_minimal_product_loop_before_loop_item');


/**
 * Custom Loop Item — the actual card
 */
add_action('bootscore_custom_loop_item', function ($context) {
  if ($context !== 'custom') return;
  if (!isset($GLOBALS['bs_loop_contexts']) || !in_array('swiper-minimal-product-loop', $GLOBALS['bs_loop_contexts'])) return;

  global $product;
  ?>
  <div <?php wc_product_class(esc_attr(apply_filters('bootscore/class/woocommerce/product/card', 'card h-100', 'minimal-product-loop')), $product); ?>>

    <div class="card-body h-100">
      <div class="row g-3 h-100">

        <div class="col-4 h-100">
          <a class="d-block" href="<?php the_permalink(); ?>" aria-hidden="true" tabindex="-1">
            <?php if (has_post_thumbnail()) : ?>
              <?php the_post_thumbnail('thumbnail', array(
                'class' => 'rounded-1 align-text-top',
                'alt'   => get_the_title(),
              )); ?>
            <?php else : ?>
              <img src="<?php echo esc_url(wc_placeholder_img_src('thumbnail')); ?>"
                   alt="<?php echo esc_attr__('Placeholder', 'woocommerce'); ?>"
                   class="rounded align-text-top">
            <?php endif; ?>
          </a>
        </div>

        <div class="col-8 h-100 d-flex flex-column">
          <?php the_title('<h3 class="h6 mb-0 text-truncate">', '</h3>'); ?>

          <p class="mb-0 small text-body-secondary text-truncate">
            <?= esc_html(wp_strip_all_tags(get_the_excerpt())); ?>
          </p>

          <p><?php echo wc_price($product->get_price()); ?></p>

          <?php
          // Add named filter, display button, then remove it cleanly
          add_filter('bootscore/class/woocommerce/loop/add-to-cart/button', 'swiper_minimal_product_loop_add_to_cart_class');
          woocommerce_template_loop_add_to_cart();
          remove_filter('bootscore/class/woocommerce/loop/add-to-cart/button', 'swiper_minimal_product_loop_add_to_cart_class');
          ?>
        </div>

      </div>
    </div>

  </div>
  <?php
});


/**
 * Close swiper slide after loop item
 */
function swiper_minimal_product_loop_after_loop_item() {
  if (isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-minimal-product-loop', $GLOBALS['bs_loop_contexts'])) {
    echo '</div>';
  }
}
add_action('bootscore_after_loop_item', 'swiper_minimal_product_loop_after_loop_item');


/**
 * Close swiper wrapper after loop
 */
function swiper_minimal_product_loop_after_loop() {
  if (isset($GLOBALS['bs_loop_contexts']) && in_array('swiper-minimal-product-loop', $GLOBALS['bs_loop_contexts'])) {
    echo '</div>';
  }
}
add_action('bootscore_after_loop', 'swiper_minimal_product_loop_after_loop');

Patterns

text

Card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Prev

Next

Card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Prev

Next

Card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Card title

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Pagination

Prev

Next

Awesome!

[bsfa fa-solid fa-star] [bsfa fa-solid fa-star] [bsfa fa-solid fa-star] [bsfa fa-solid fa-star] [bsfa fa-solid fa-star]

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam

Ethan Grayson

Co-Founder / CEO

Average 😐

[bsfa fa-solid fa-star] [bsfa fa-solid fa-star] [bsfa fa-solid fa-star-half-stroke] [bsfa fa-regular fa-star] [bsfa fa-regular fa-star]

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt

Clara Whitfield

Senior Designer

Good but…

[bsfa fa-solid fa-star] [bsfa fa-solid fa-star] [bsfa fa-solid fa-star] [bsfa fa-solid fa-star] [bsfa fa-regular fa-star]

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna

Lucas Redmond

Frontend Dev

Amazing job!

[bsfa fa-solid fa-star] [bsfa fa-solid fa-star] [bsfa fa-solid fa-star] [bsfa fa-solid fa-star] [bsfa fa-solid fa-star]

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam

Mia Larkson

Human Resources

Oh no

[bsfa fa-solid fa-star] [bsfa fa-regular fa-star] [bsfa fa-regular fa-star] [bsfa fa-regular fa-star] [bsfa fa-regular fa-star]

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt

Daniel Everhart

Finance

Prev

Next

Slide #1

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Slide #2

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Slide #3

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Slide #4

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Slide #5

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Slide #6

Some quick example text to build on the card title and make up the bulk of the card’s content.

Button

Pagination

Prev

Next