Title: Progress Bar
Author: Chris Reynolds
Published: <strong>Pebrero 10, 2012</strong>
Last modified: Mayo 5, 2025

---

Search plugins

![](https://ps.w.org/progress-bar/assets/banner-772x250.png?rev=2909774)

![](https://ps.w.org/progress-bar/assets/icon-256x256.png?rev=2909774)

# Progress Bar

 By [Chris Reynolds](https://profiles.wordpress.org/jazzs3quence/)

[Download](https://downloads.wordpress.org/plugin/progress-bar.2.2.4.zip)

 * [Details](https://ceb.wordpress.org/plugins/progress-bar/#description)
 * [Reviews](https://ceb.wordpress.org/plugins/progress-bar/#reviews)
 *  [Installation](https://ceb.wordpress.org/plugins/progress-bar/#installation)
 * [Development](https://ceb.wordpress.org/plugins/progress-bar/#developers)

 [Support](https://wordpress.org/support/plugin/progress-bar/)

## Description

This plugin does one thing: it creates a simple (but nice-looking) CSS3 progress
bar that you can style with your own CSS and use wherever you want with a simple
shortcode. Now with support for custom colors and gradients.

To add a progress bar to a post or a page, simply use this shortcode:

    ```
    [wppb progress=50]
    ```

where “50” in the example above is a progress bar that is 50% complete.  Simple,
lightweight, cross-browser compatible (degrades nicely for browsers that don\’t 
support CSS3).

For more examples and full descriptions of all the available options, click on the
[options tab](https://wordpress.org/extend/plugins/progress-bar/other_notes/).

For demos of each of the options, go here: https://progressbar.jazzsequence.com

### Options

This page describes all the available parameters for the shortcode. These can be
used in any combination. The only **required** parameter is **progress**. All parameters
are case-sensitive (e.g. “progress” will work but “Progress” will not).

#### progress (required)

This determines how full the progress bar will be. Progress can be in 2 forms, either
a number (0-100), in which case it will be interpreted as a percentage, or as a 
fraction (e.g. 25/100). Since 1.1, you can also use dollar signs (e.g. $63/$180),
for example to create a fundraising progress bar. If using dollar signs, you only
_need_ to add a dollar sign to one or the other of the two values (e.g. 63/$180 
or $63/180) — the plugin will output either option the same ($63/$180). Your progress
can go over, too (e.g. 150/100 or 123%), but your mileage may vary for the display.
It’s not recommended to use this with the **fullwidth** option, for example, because
your progress will spill outside of your main body container.

_Examples_

    ```
    [wppb progress=50] A progress bar that is 50% complete

    [wppb progress="50/100"] A progress bar that is 50/100 complete

    [wppb progress="$45/$50"] A dollar value progress bar that is $45/$50 complete

    [wppb progress=110] A progress bar that has gone over 100%

    [wppb progress=150/100] A progress bar that has exceeded its goal

    [wppb progress=$125/100] A fundraising-style progress bar that has exceeded the goal
    ```

#### option

This adds one of several supported options to the progress bar. For those that know
CSS, new “options” can be added simply by adding new styles to your style.css. See
the [Frequently Asked Questions](https://wordpress.org/support/plugin/progress-bar/faq/)
page for more information on creating new CSS classes. Options can be combined by
wrapping them in quotes in the shortcode. The progress bar will naturally have an
inner shadow applied to it. The `flat` option was added to remove the shadow and
display a “flat” color, best when used in conjunction with the `color` parameter.

Supported values: candystripe, animated-candystripe, red, orange, green, yellow,
flat

_Examples_

    ```
    [wppb progress=50 option=red] Displays a red progress bar

    [wppb progress=50 option="animated-candystripe green"] Displays a green progress bar with an animated candystripe

    [wppb progress=50 option="candystripe orange"] Displays an orange progress bar with a static candystripe

    [wppb progress=50 option=candystripe] Displays a default progress bar (blue) with a static candystripe

    [wppb progress=50 option=flat color=red] Displays a red progress bar with no inner shadow or gradient

    [wppb progress=50 option="flat candystripe" color=gray] Displays a gray progress bar with no inner shadow or gradient and a static candystripe
    ```

#### location

Displays the percentage, text or fraction either inside or outside the progress 
bar.
 _Note:_ It is _not_ recommended to use `location=after` if you are displaying
a progress bar that exceeds its goal.

Supported values: inside, after

_Examples_

    ```
    [wppb progress=50 option=red location=after] Displays a red progress bar with the progress displayed to the right of the progress bar.

    [wppb progress=50 option="red candystripe" location=inside] Displays a red progress bar with a static candystripe and the progress displayed inside the progress bar.

    [wppb progress=85 location=after text="foo"] Displays a progress bar with the text "foo" displayed after the progress bar.
    ```

#### text

Displays arbitrary text instead of the progress bar. Can be used with the **location**
parameter to define whether the text appears inside or outside the progress bar (
default is inside). _Must_ be used inside double quotes. HTML code is stripped from
the final output.

Supported values: any plain text string

_Examples_

    ```
    [wppb progress=75 text="My awesome text"] Displays "My awesome text" inside a 75% progress bar.

    [wppb progress=85 location=after text="foo"] Displays "foo" after an 85% progress bar

    [wppb progress=85 location=inside text="hello!"] Displays "hello!" inside an 85% progress bar (note, default location for text is inside, so it isn't required to specify "inside").
    ```

#### fullwidth

Makes the progress bar take up 100% of the container. (Good for responsive layouts.)
_Not_ recommended for progress bars that exceed their goal.
 _Note:_ As of 2.2.4,`
fullwidth` will _only take truthy_ values. Previously, it would accept any value,
e.g. `fullwidth=foo` would output the same as `fullwidth=true`. This is no longer
the case.

Supported value: true

_Examples_

    ```
    [wppb progress=50 fullwidth=true] Displays a full-width (responsive) progress bar

    [wppb progress=50 fullwidth=foo] Identical to the above progress bar
    ```

#### color

Defines a color for the progress bar. This is useful for creating new progress bar
colors on the fly without having to edit CSS. Cannot be used in conjunction with
any of the pre-existing color options (red, yellow, orange or green).

Supported values: any hexadecimal color value, any rgb/rgba color value, any css-
supported [color name](http://www.w3schools.com/cssref/css_colornames.asp)

_Examples_

    ```
    [wppb progress=50 color=rgb(123,50,87)]

    [wppb progress=55 color=rgba(123,64,99,0.3)]
    ```

_Note:_ Since the background color for the progress bar is dark gray, any opacity
applied to the rgba color will make the color darker, since it’s adding to the dark
gray background.

    ```
    [wppb progress=22 color=#ff3257]

    [wppb progress=68 color=lightYellow]
    ```

#### endcolor

Defines an end color for a custom gradient when used with **color**.

Supported values: any hexadecimal color value, any rgb/rgba color value, any css-
supported [color name](http://www.w3schools.com/cssref/css_colornames.asp)

_Examples_

    ```
    [wppb progress=72 color=turquoise endcolor=teal]

    [wppb progress=83 color=#ff2222 endcolor=#ff9984]

    [wppb progress=50 color=rgb(203,96,179) endcolor=rgb(173,18,131)]
    ```

#### gradient

Determines an end-color on the fly for a gradient based on the **color** parameter.
As such, **gradient** _requires_ **color** to be present, otherwise the color and
gradient will be set to the default color (blue). Cannot be used in conjunction 
with any of the pre-existing color options (red, yellow, orange or green). When 
using `gradient` the **color** value _must_ be in hexadecimal form.

Supported values: any positive or negative decimal value from 0.0 to 1.0 or -1.0.

_Examples_

    ```
    [wppb progress=22 color=#ff0000 gradient=0.2] Displays a red progress bar that gets lighter at the bottom

    [wppb progress=22 color=#ff0000 gradient=-0.2] Displays a red progress bar that gets darker at the bottom
    ```

**This does not work:**

    ```
    [wppb progress=34 color=rgb(22,18,99) gradient=0.2]
    ```

## Installation

Extract the zip file and just drop the contents in the wp-content/plugins/ directory
of your WordPress installation and then activate the Plugin from Plugins page.

## FAQ

### How do I change the currency?

WP Progress bar allows currencies in progress bars. By default, the supported currency
symbol is $. However, since version 2.2, you can modify this in your environment
by using the `wppb.currency_symbol` filter, e.g.:

    ```
    `
    ```

add_filter( ‘wppb.currency_symbol’, ‘my_custom_currency_symbol’ );
 function my_custom_currency_symbol(
$symbol ) { return ‘£’; } `

This code would allow-list the £ symbol for use in progress bars. You can also add
support for multiple currency symbols in a similar way:

    ```
    `
    ```

add_filter( ‘wppb.currency_symbol’, ‘my_custom_currency_symbol’ );
 function my_custom_currency_symbol(
$symbol ) { $allowed_symbols = [ ‘$’, ‘£’ ]; if ( in_array( $symbol, $allowed_symbols)){
return $symbol; }

    ```
    return '$';
    ```

}
 `

### How do I change the colors?

You can change the colors via the css.  Use `div.wppb-progress` to change the style
of the container and `div.wppb-progress > span` to change the style of the bar itself.
You can also change the candystripe and animated candystripe.  See http://css-tricks.
com/css3-progress-bars/ for an excellent tutorial and http://www.colorzilla.com/
gradient-editor/ for a CSS gradient generator.

### No, really, how do I change the colors? I don’t know much about CSS.

Okay, here’s a great example that’s being used in the plugin CSS right now to create
the ‘red’ option. Here’s the CSS:

    ```
    /* red */
    div.wppb-progress > span.red {
        background: #d10418; /* Old browsers */
        background: -moz-linear-gradient(top, #d10418 0%, #6d0019 100%); /* FF3.6+ */
        background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#d10418), color-stop(100%,#6d0019)); /* Chrome,Safari4+ */
        background: -webkit-linear-gradient(top, #d10418 0%,#6d0019 100%); /* Chrome10+,Safari5.1+ */
        background: -o-linear-gradient(top, #d10418 0%,#6d0019 100%); /* Opera 11.10+ */
        background: -ms-linear-gradient(top, #d10418 0%,#6d0019 100%); /* IE10+ */
        background: linear-gradient(top, #d10418 0%,#6d0019 100%); /* W3C */
    }
    ```

You don’t need to worry about the candystripes — those will apply to your new option
automatically. Using this example, you can change the hex values and create a new
class (like span.green or span.orange or span.nyannyanrainbows) that you can use
inside the shortcode. Want to see where I got those gradient values? Go here: http://
www.colorzilla.com/gradient-editor/#d10418+0,6d0019+100;Custom

### What about placement of the percentage? Where’s that?

At the end of `wppb.css` you’ll find the two classes for the percentage parameter:

    ```
    /* after */
    div.wppb-wrapper.after { width: 440px; }
    div.wppb-wrapper.after div.wppb-progress { float: left; }
    div.wppb-wrapper.after div.after { float: right; line-height: 25px; }

    /* inside */
    div.wppb-wrapper.inside { width: 400px; height: 25px; position: relative; }
    div.wppb-wrapper div.inside { margin: 0 auto; line-height: 25px; color: #ffffff; font-weight: bold; position: absolute; z-index: 1; width: 400px; text-align: center; }
    ```

Position these however you want. If you wanted the percentage to be inside the progress
bar but towards the end, you could do something like this:

    ```
    /* right */
    div.wppb-wrapper.right { width: 400px; height: 25px; position: relative; }
    div.wppb-wrapper div.inside { margin: 0 auto; line-height: 25px; color: #ffffff; font-weight: bold; position: absolute; z-index: 1; width: 400px; text-align: right; padding-right: 10px }
    ```

## Reviews

![](https://secure.gravatar.com/avatar/da552dddb63bc90f0754b737924baeea6439759d62a62ada97d51f2718e5eb2e?
s=60&d=retro&r=g)

### 󠀁[Works great!](https://wordpress.org/support/topic/works-great-9164/)󠁿

 [Brisch](https://profiles.wordpress.org/brisch/) Pebrero 28, 2024 1 reply

Also mobile-ready! Works great, thanks!

![](https://secure.gravatar.com/avatar/14134614345980ae1baee7de4d6282646d50d4ef49485c77d1791530c1aa428b?
s=60&d=retro&r=g)

### 󠀁[Clean and simple](https://wordpress.org/support/topic/clean-and-simple-130/)󠁿

 [applestalk](https://profiles.wordpress.org/applestalk/) Mayo 21, 2022 1 reply

Love this plugin, clean and simple, easy to customise and place wherever you like.

![](https://secure.gravatar.com/avatar/ef94c89fb8110d2600eb0bb83dc2c0dd425441771e57c8989f38e2e3ae9ebcfd?
s=60&d=retro&r=g)

### 󠀁[Absolutely Cute](https://wordpress.org/support/topic/absolutely-cute/)󠁿

 [authormelanieray](https://profiles.wordpress.org/authormelanieray/) Marso 26, 
2018

Fill in as much or as little as you want. I really like the way this looks on my
site.

![](https://secure.gravatar.com/avatar/776e2919ea7d18489166743eea3d5cd8b0d111a4dd4d08e4d37e82b20a4dd507?
s=60&d=retro&r=g)

### 󠀁[Thank you!](https://wordpress.org/support/topic/thank-you-1369/)󠁿

 [SUMMER](https://profiles.wordpress.org/superbsnail/) Hunyo 14, 2017 1 reply

Wonderful plugin that is my wanted, thank you!

![](https://secure.gravatar.com/avatar/9e935dc144f6fea1f83f1ef4bea18496d1d35ed84dcd2145792bd62f400bf2ad?
s=60&d=retro&r=g)

### 󠀁[Thanks.](https://wordpress.org/support/topic/thanks-1184/)󠁿

 [Ümit Solmaz](https://profiles.wordpress.org/uslmz/) Abril 1, 2017

Thanks you.

![](https://secure.gravatar.com/avatar/f234fc847cb0409526e1f04a72451f6009dbc0d84f7e74c10ba6a37bc3d8ec35?
s=60&d=retro&r=g)

### 󠀁[Awesome](https://wordpress.org/support/topic/awesome-3859/)󠁿

 [Arjen_M](https://profiles.wordpress.org/arjen_m/) Disyembre 18, 2016

Really nice plugin!

 [ Read all 24 reviews ](https://wordpress.org/support/plugin/progress-bar/reviews/)

## Contributors & Developers

“Progress Bar” is open source software. The following people have contributed to
this plugin.

Contributors

 *   [ Chris Reynolds ](https://profiles.wordpress.org/jazzs3quence/)

[Translate “Progress Bar” into your language.](https://translate.wordpress.org/projects/wp-plugins/progress-bar)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/progress-bar/), check
out the [SVN repository](https://plugins.svn.wordpress.org/progress-bar/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/progress-bar/) by
[RSS](https://plugins.trac.wordpress.org/log/progress-bar/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

** 2.2.4 **
 * Fixed XSS vulnerability reported by muhammad yudha for [Patchstack](https://patchstack.com)*
Cleaned up and refactored some possibly buggy code and sanitization/escaping issues.

** 2.2.3 **
 * Fixed PHP < 8.0 backwards compatibility issue [[#24](https://github.com/jazzsequence/progress-bar/pull/24)]

** 2.2.2 **
 * use esc_attr instead of sanitize_text_field [[#20](https://github.com/jazzsequence/progress-bar/pull/20)]*
Fix exception thrown on 0% progress bars [[#21](https://github.com/jazzsequence/progress-bar/pull/21)]

** 2.2.1 **
 * Adds tests for XSS vulnerabilities [[#11](https://github.com/jazzsequence/progress-bar/pull/11),
[#15](https://github.com/jazzsequence/progress-bar/pull/15), [#17](https://github.com/jazzsequence/progress-bar/pull/17)*
fix the hexdec string conversion notice [[#16](https://github.com/jazzsequence/progress-bar/pull/16)]*
Resolve XSS vulnerabilities [[#17](https://github.com/jazzsequence/progress-bar/pull/17)]

** 2.2.0 **
 * Adds LICENSE file [[#4](https://github.com/jazzsequence/progress-bar/pull/4)]*
Adds composer for package management [[#5](https://github.com/jazzsequence/progress-bar/pull/5)]*
Adds CODEOWNERS file [[#6](https://github.com/jazzsequence/progress-bar/pull/6)]*
Added Composer scripts for linting & fixed linting issues. Also, resolved possible
XSS issues. [[#7](https://github.com/jazzsequence/progress-bar/pull/7)] * Added 
unit tests [[#8](https://github.com/jazzsequence/progress-bar/pull/8)]

** 2.1.6 **
 * Fixed a bug with the progress bar animation on full-width progress
bars. (Props [@leninzapata](https://wordpress.org/support/users/leninzapata/))

** 2.1.5 **

 * tested on WordPress 5.9
 * removed “deprecated” location documentation

** 2.1.4 **
 * tested on WordPress 4.4

** 2.1.3 **

 * fixed widget support for WordPress 4.3

**2.1.2**

 * version bump
 * added plugin icon

**2.1.1**

 * allowed candystriping to apply to custom colors

**2.1**

 * fixed an issue where wppb_animate.js was breaking the responsiveness of the fullwidth
   option. Resolved by not using the animation when fullwidth is being used.
 * added number formatting on fraction-based output. ultimately resolves an issue
   where a comma in the number breaks the formatting. Numbers larger than 1,000 
   need to be entered in with no comma (e.g. 1000), but will output with the correct
   number i18n (e.g. 1,000).

**2.0.1**

 * added a description area for sidebar widget

**2.0**

 * added progress bar sidebar widget
 * some minor css fixes

**1.2.1**

 * fixes positioning of text if there is text and location isn’t defined

**1.2**

 * adds text parameter to display custom text (suggested by [itsonlybarney](https://profiles.wordpress.org/itsonlybarney/))
 * deprecated percent parameter
 * added (more accurate) location parameter to take the place of the percent parameter
 * added support for percent to migrate to location
 * strips html from text content

**1.1**

 * adds color parameter to define a color for the progress bar
 * adds brightness function to create custom gradients on the fly based on the start
   color with the gradient parameter
 * adds endcolor prameter to create custom gradients
 * updates readme file with full usage instructions
 * adds a flat option to display the progress bar with no inner shadow as suggested
   by Ciprian Popescu [here](https://wordpress.org/support/topic/iris-colour-picker-for-bar-color?replies=13#post-3729300)

**1.0.5**

 * fixed undefined index notices
 * added support for dollar progress bars for fundraising or budget reports, e.g.
   $45 / $50

**1.0.4**

 * added ability to show progress like 50/100 thanks to pull request from [RavanH](https://github.com/RavanH)
   https://github.com/jazzsequence/progress-bar/pull/1

**1.0.3**

 * added fullwidth parameter thanks to [callingmedic911](https://profiles.wordpress.org/callingmedic911/)—
   this allows the progress bar to have a variable width based on the width of the
   containing div (not exactly responsive, as suggested [here](https://wordpress.org/support/topic/responsive-progress-bar?replies=12#post-3291966),
   but it allows the progress bar to be used in sidebars or to take up the full 
   width of the post content area).

**1.0.2**

 * fixes it so either ‘candystripe’ (singular) or ‘candystripes’ (plural) works 
   for candystripes (documentation said singular, code said plural) — resolves: 
   https://wordpress.org/support/topic/plugin-progress-bar-wheres-the-canystripe(
   thanks to dgodfather for pointing this out)

**1.0.1**

 * added “red” as an optional parameter (can go nuts with colors here, but don’t
   really want to do that yet since it’s just going to add a lot of unused CSS to
   the stylesheet) | usage [wppb progress=50 option=red]
 * added new parameter $percent | usage [wppb progress=50 percent=after] — this 
   will display the percentage after the progress bar; [wppb progress=50 percent
   =inside] — this will display the percentage on the actual bar itself

**1.0**

 * initial commit

 

## Meta

 *  Version **2.2.4**
 *  Last updated **11 bulan ago**
 *  Active installations **1numero_pormat_thousands_sep000+**
 *  WordPress version ** 2.8 or higher **
 *  Tested up to **6.7.5**
 *  Language
 * [English (US)](https://wordpress.org/plugins/progress-bar/)
 * Tags
 * [CSS3](https://ceb.wordpress.org/plugins/tags/css3/)[progress](https://ceb.wordpress.org/plugins/tags/progress/)
   [progress bar](https://ceb.wordpress.org/plugins/tags/progress-bar/)[shortcode](https://ceb.wordpress.org/plugins/tags/shortcode/)
 *  [Advanced View](https://ceb.wordpress.org/plugins/progress-bar/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  24 5-star reviews     ](https://wordpress.org/support/plugin/progress-bar/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/progress-bar/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/progress-bar/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/progress-bar/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/progress-bar/reviews/?filter=1)

[Add my review](https://wordpress.org/support/plugin/progress-bar/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/progress-bar/reviews/)

## Contributors

 *   [ Chris Reynolds ](https://profiles.wordpress.org/jazzs3quence/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/progress-bar/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://paypal.me/jazzsequence)