Table of Contents
How to use text (String) columns in wpDataTables
Say your staff table lists first names, last names and job titles. These are text values, and wpDataTables shows them as String columns, the default type for every column that isn’t a number, date or link. A String column shows the content as it is, so it can also hold HTML from your source, such as a button or a small embed.
How do I make a column a String column with Tabella AI?
Open the table, click Ask Tabella AI and name the column and the type.
- Open the table. Go to wpDataTables → wpDataTables and click the table title.
- Ask Tabella AI. Click Ask Tabella AI and type, for example: Change the Position column type to String.
- Check and save. Tabella AI lists what it changed. Click Save Changes, or Undo table changes to go back.
How do I make a column a String column in the column settings?
Set the column type to String in the Data tab of the column settings and save the table.
- Open the column settings. Go to wpDataTables → wpDataTables, open the table and click the settings icon in the column header.
- Change the type. In the Data tab, set the column type to String.
- Save the table. Click Save Changes.
How does a String column show, sort and filter values?
A String column shows the text from the source and sorts it alphabetically:
| What | How it works |
|---|---|
| Display | The value as it is. Line breaks in the source become line breaks on the page, and HTML is rendered. |
| Sorting | Alphabetical |
| Filter types | Text, Selectbox, Multiselectbox and Checkbox |
| Foreign key | A String column can show values from another table instead of IDs. Read Table relations (foreign keys). |
What should I remember about String columns?
String is the default type for text. It shows the value as it is, HTML included, sorts alphabetically and works with text, dropdown and checkbox filters. Avoid HTML in columns you sort or filter, and use number types for numbers.