Limited time
Make Better Decisions With Better Data
Up to 30%Off
Grab Now
Limited time

How do I create currency and percentage columns in WordPress tables?

How do I create currency and percentage columns in WordPress tables?

You create currency, percentage and other labelled columns in wpDataTables by adding a “Cell content prefix” and a “Cell content suffix” to a numeric column, rather than choosing a dedicated column type. Sometimes you need more than an integer or a float column when you’re referring to a percentage, or to amounts in euros, dollars, etc.

How do currency, percentage and similar columns work in wpDataTables?

Instead of many extra column types, wpDataTables adds a prefix and a suffix to each cell value, which keeps sorting and filtering intact.

  • Adding all these examples as column types would make the plugin usage confusing for users, so we found a different solution: we added a “Cell content prefix” and a “Cell content suffix” block for each of the column settings.
  • Whatever you enter in the “Cell content prefix” (for example a $, or other currency sign) will be rendered in each cell of this column before the actual cell value; whatever you enter in the “Cell content suffix” (for example “%” or “pcs.”) will be rendered after the actual cell value. These entrees will not affect sorting, filtering, or any other column functions.

What does a table with currency columns look like?

A currency column simply shows the prefix or suffix in front of or after each value. For example, for this table the “Yearly revenue” column has a “$” sign defined in the “Cell content prefix”.

Where can I learn about related table features?

Wait, Before You Download!

To get your hands on wpDataTables Lite, please enter your email address below. We’ll send you a direct download link and keep you updated on existing features along with helpful tips and tricks!

By continuing, I accept Privacy Policy and T&C
Mail Box