How to Add a Hero Slider in WordPress (7 Steps)

How to Add a Hero Slider in WordPress (7 Steps)

A full-width hero slider is often the first thing visitors see on a homepage. Done well, it highlights three or four offers without slowing the page down. Done poorly, it loads jQuery, five megabytes of images and an inaccessible carousel that never pauses. This tutorial shows how to add a hero slider in WordPress in seven steps with our 007AJ SlideCraft slider builder, including backgrounds, text and button layers, responsive settings, and the accessibility and performance checks most guides skip.

Disclosure: 007AJ makes SlideCraft. The accessibility and performance checklist in this guide applies to any WordPress slider you use.

What a hero slider is (and when to use one)

A hero slider is a large, usually full-width banner at the top of a page that cycles through a few slides. Each slide typically has a background image or video, a headline, a short line of text and a button. It suits:

  • Homepages that promote two to four offers (a product, a sale, a free guide, a booking link).
  • Landing pages where you want one clear call to action per slide.
  • Sites that need a boxed slider, carousel or fade slideshow as well as a full-width hero.

Skip a slider if you only have one message. A single static hero image with a heading and button is faster and clearer.

Before you start

  • WordPress 6.3 or newer and PHP 7.4 or newer (SlideCraft is tested up to WordPress 6.8).
  • Two to four images sized for the hero (around 1920×800 works for full-width). Compress them before upload.
  • The exact headline, short text and button URL for each slide written down first, so you are not inventing copy inside the editor.

Step 1: Install and activate SlideCraft

Go to Plugins → Add New → Upload Plugin, choose the SlideCraft zip, click Install Now and then Activate. A SlideCraft menu appears in the admin sidebar. Open SlideCraft → Settings once to confirm nothing needs deleting on uninstall (leave that unchecked unless you really want to wipe sliders later).

Step 2: Create a new slider

Go to SlideCraft → Add New Slider. Give it a clear name such as “Home hero” (you can also set a slug for the theme API). Add your first slide, then duplicate it for the others so the layout stays consistent. You can reorder slides by drag or with the arrow controls.

Step 3: Set backgrounds and layers

For each slide:

  • Background: choose an image with a focal point (and optional Ken Burns zoom), a YouTube/Vimeo/MP4 video, or a solid color or gradient with an overlay. Overlay color helps white text stay readable on busy photos.
  • Layers: add text, button and image layers. Positions use percentages, so they scale with the slider. Set delay, duration and easing for fade, slide (up/down/left/right) or zoom animations.
  • Keep it short: one headline, one supporting line and one primary button per slide. Extra layers fight the visitor’s attention.

Step 4: Choose type and height

Under slider settings, pick Full-width hero for a homepage banner. Boxed, carousel (slides per view per device) and fade slideshow are available for other layouts. Set a height that fits your theme (for example 560–720 px on desktop). Turn on arrows, dots, autoplay with a progress bar, pause on hover and focus, loop, swipe and keyboard as needed. Always leave a visible pause/play control when autoplay is on.

Step 5: Check tablet and mobile

Switch the editor to tablet and mobile views. For each layer you can change position, width and font size, or hide the layer on that device. Long headlines that look fine on desktop often wrap badly on phones — shorten them or hide the supporting line on mobile. Use the live preview frame at each width before you publish.

Step 6: Publish and place it with a block or shortcode

Save the slider, then show it on the page:

  • Block: insert the SlideCraft block and pick the slider.
  • Shortcode: [slidecraft id="12"] or use the slug, for example [slidecraft slug="home-hero"].
  • Widget: add the SlideCraft widget in a widget area.
  • Theme / PHP: slidecraft_show('home-hero') (or the numeric id).

For a true full-width hero, set the block to full width or call slidecraft_show() outside your theme’s narrow content wrapper. Otherwise the slider only fills the content column.

Step 7: Accessibility and performance checks

Before you call it done:

  • Accessibility: labelled controls, keyboard support, a pause/play button, a live region for slide changes and respect for reduced-motion. Confirm you can reach every control with Tab and pause autoplay.
  • Performance: the first slide should load eagerly with fetchpriority="high" and explicit width/height; later slides should lazy-load with responsive srcset. Videos should embed only when that slide is visible. SlideCraft does this by default — do not override it with a page builder that reloads every image at once.
  • Assets only where needed: scripts and styles should load only on pages that show a slider, not site-wide.
  • Privacy: SlideCraft stores no visitor data and sets no cookies. YouTube privacy-enhanced embeds and Vimeo DNT are used only when you choose those video backgrounds.

Open the homepage in a private window, throttle to “Slow 3G” in DevTools once, and confirm the first slide appears quickly and later slides do not block first paint.

Next steps

Frequently asked questions

What is the best way to add a hero slider in WordPress?

Use a dedicated slider plugin with a visual editor, place it with a block or shortcode, and check accessibility and performance. Avoid page-builder “slider” modules that load heavy scripts on every page.

Do WordPress hero sliders slow down a site?

They can if the plugin loads jQuery site-wide, serves huge images or embeds every video on page load. Prefer vanilla JavaScript, eager loading only for the first slide, lazy loading for the rest and video embeds only when a slide is visible.

How many slides should a hero slider have?

Two to four is enough for most homepages. More slides mean fewer people ever see the later ones, and more images to download.

Can I use a shortcode and a block for the same slider?

Yes. SlideCraft supports the block, shortcode ([slidecraft id="12"] or slug), widget and slidecraft_show(). Pick whichever fits the page builder or theme you use.

Does SlideCraft need jQuery?

No. The front end is dependency-free vanilla JavaScript, and assets load only on pages that show a slider.

Free ebook: Build It Right: The Practical Guide to WordPress Themes & Plugins. Get your free copy

More free tools: see all our free WordPress plugins or browse the 007AJ shop.