I want a column to feature 2 data types (e.g. some rows in the same column would feature images while other rows would feature string text). This is important to us because we only want to display images in certain cells of a column while having the rest be normal string text). Same goes for "string" and "url link", as we only want certain cells in a column to have hyperlinks while having all other cells in a column defaulting to "string" text.
Is there a way to have a column type to have multiple data types or is it all or nothing (if a column type is set to "string" I can't show images in any rows?).
Note: we're uploading data from an excel using the "Create a table by importing data from a data source" and editing published tables in the column settings.
You can do this with string-type columns by using HTML tags. Basically, in cells where you want to include images, you'd need to use the <img> tag, like this:
<img src="url-to-the-image" height="50"> Some text, if you want to add it
And to include links, you'd use the anchor tag, like this:
<a href="some-url">Hyperlink text</a>
Or if you want the link to be visible, without the hyperlink text:
Hi,
I want a column to feature 2 data types (e.g. some rows in the same column would feature images while other rows would feature string text). This is important to us because we only want to display images in certain cells of a column while having the rest be normal string text). Same goes for "string" and "url link", as we only want certain cells in a column to have hyperlinks while having all other cells in a column defaulting to "string" text.
Is there a way to have a column type to have multiple data types or is it all or nothing (if a column type is set to "string" I can't show images in any rows?).
Note: we're uploading data from an excel using the "Create a table by importing data from a data source" and editing published tables in the column settings.
Hello Eric
Thank you for reaching out to us.
You can do this with string-type columns by using HTML tags. Basically, in cells where you want to include images, you'd need to use the <img> tag, like this:
And to include links, you'd use the anchor tag, like this:
Or if you want the link to be visible, without the hyperlink text:
I hope that helps.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables