How to Add a Reading Progress Bar in WordPress

How to Add a Reading Progress Bar in WordPress

Long guides are valuable, but readers can’t always tell how much is left, and many give up halfway. A reading progress bar is a thin line across the top of the screen that fills as the visitor scrolls. It’s a small visual cue that shows progress, encourages readers to finish and makes long articles feel more manageable. This guide shows you how to add a reading progress bar in WordPress with a plugin or a few lines of code.

Why Add a Reading Progress Bar?

  • Sets expectations: readers see at a glance how long the article is.
  • Encourages completion: a nearly full bar nudges readers to finish.
  • Feels polished: it’s a common feature on well-designed publications and documentation sites.
  • Costs almost nothing: a well-built bar is a few lines of CSS and JavaScript.

Where to Use It

Progress bars make sense on long-form content such as tutorials, guides and documentation. They add little to short pages, shop pages or the homepage, so most sites show them on single posts only.

How to Add a Reading Progress Bar With a Plugin

Reading Progress Indicator from Simpli Plugin is a free, lightweight plugin that adds a progress bar which fills as visitors scroll through your posts and pages.

  1. Download the plugin ZIP from its product page.
  2. Go to Plugins → Add New Plugin → Upload Plugin.
  3. Upload the file, click Install Now, then Activate Plugin.
  4. Open a long post and scroll to see the bar fill.

Choose a colour that matches your brand and contrasts with your header, and keep the bar thin, around 3 to 5 pixels.

Want progress bars combined with estimated reading time, a table of contents or “next article” prompts? Simpli Plugin’s team builds custom reading experiences for content sites.

Talk to Our Developers →

How to Add a Reading Progress Bar With Code

Developers can build a basic bar with a small amount of CSS and JavaScript. First, the styles:

#read-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0;
    background: #2563eb;
    z-index: 9999;
}

Then add the element and a script that updates its width on scroll, loaded only on single posts:

add_action( 'wp_footer', function () {
    if ( ! is_single() ) {
        return;
    }
    ?>
    <div id="read-progress" aria-hidden="true"></div>
    <script>
    window.addEventListener( 'scroll', function () {
        var doc = document.documentElement;
        var max = doc.scrollHeight - doc.clientHeight;
        var pct = max > 0 ? ( doc.scrollTop / max ) * 100 : 0;
        document.getElementById( 'read-progress' ).style.width = pct + '%';
    }, { passive: true } );
    </script>
    <?php
} );

Add the PHP through a child theme or a small custom plugin, and the CSS in Appearance → Customize → Additional CSS. The aria-hidden attribute tells screen readers to ignore the bar, since it’s purely visual.

Best Practices

  • Keep it thin and subtle. It should support reading, not distract from it.
  • Measure the article, not the whole page if your footer is very long, so the bar reaches 100% at the end of the content.
  • Check it with a sticky header, so the bar isn’t hidden behind it.
  • Use it on long content only.

Common Problems and How to Fix Them

The Bar Is Hidden Behind the Header

Increase the bar’s z-index or position it just below the sticky header.

The Bar Never Reaches 100%

The page has a long footer or comments section. Calculate progress based on the article element instead of the whole page.

Scrolling Feels Laggy

Use a passive scroll listener, as in the example above, and avoid heavy calculations on every scroll event.

Frequently Asked Questions

Does a reading progress bar affect SEO?

Not directly. It can help readers stay on long articles, which supports engagement.

Will it slow down my site?

A simple bar adds a few lines of code and has no noticeable impact.

Can I show it on pages as well as posts?

Yes. Change the condition in the code, or the plugin’s display settings, to include pages.

Help Readers Reach the End

A reading progress bar is a small touch that makes long guides easier to read. Keep it thin, show it on long posts and make sure it works with your header.

Download Reading Progress Indicator for free, and browse the full Simpli Plugin library. If you need custom reading features, our developers can build them.

Request a Custom Plugin →