Please wait...

String column

Video versionA video overview of string column in wpDataTables

String columnsString column type and when to use it

String column is the default, and the most basic column type of wpDataTables. You can put any content in a string column, and it will be rendered “as is”. If you, for example, want to put some specific HTML (buttons, iframes, or anything else) in a string column, you can generate it in the data source, and it will be rendered on the front-end.

  • Rendering rules: The only thing to note is that newline characters in the input data source will be translated to “<br/>” tag in the front-end.
    • Use values from another table (Foreign key) – This allows configuring a relation to another wpDataTable to show user names from a user’s table for example, instead of user ids. Please read the full tutorial on configuring table relations / foreign keys to see how this works.
  • Sorting rules: alphabetical.
  • Applicable filter types: text, selectbox, checkbox.

Issues to note: if you use HTML inside of string columns, sorting and filtering by this column can in some cases yield strange results, since it will also apply the sorting rules to the HTML itself.

ExampleA wpDataTable that uses string columns

First Name“, “Last Name” and “Position” columns of this table are string type columns:

Never miss new features!

Join 3000+ newsletter subscribers

Never miss notifications about new cool features, promotions, giveaways or freebies - subscribe to our newsletter! We send about one mail per month, and do our best to keep our announcements interesting.

By clicking "subscribe" you consent that the information you provide via this form will be securely processed and stored in compliance with EU privacy laws (GDPR).
This  information will be used to send you newsletters as well as pre-populate any forms, should you want to edit your newsletter preferences.
You can always use this link to unsubscribe from the newsletter. You can see our Privacy Policy here.