- I would like to set my table column to a fixed width - and if it ranges out of this max width go to a New Line. Is this possible?
- I now display my Link as a Full Link - which uses a lot of space. Is it possible to use a default icon and attach the link to this icon? My idea is to use two small icons for the Official website, and one for the Github repo?
1. You need to disable the "Scrollable" feature in the Display tab above the table, and then enable "Limit table width" and "Wrap text"
2. If you're using URL Link columns, you can have the link appear as a button, but one column can only store one URL, so you would either need two URL Link columns, or use "String" type columns, and use anchor tags with custom classes.
Regarding question 2; is it also possible to use a custom image for the button? For example if I want the link to a Twitter account then I can use the twitter logo in each cell to be clicked?
Sure, you can do that with custom CSS, so you don't need to set the column as a URL, but instead as multi-line string.
When you add the column as a string, you will need to define the URL with an anchor tag. For example to open the link in a new tab, add the URL and the target:
Hi,
I have two questions related to WP Table.
- I would like to set my table column to a fixed width - and if it ranges out of this max width go to a New Line. Is this possible?
- I now display my Link as a Full Link - which uses a lot of space. Is it possible to use a default icon and attach the link to this icon? My idea is to use two small icons for the Official website, and one for the Github repo?
Thank you in advance for your help.
Regards,
Ruben
Hello Ruben
1. You need to disable the "Scrollable" feature in the Display tab above the table, and then enable "Limit table width" and "Wrap text"
2. If you're using URL Link columns, you can have the link appear as a button, but one column can only store one URL, so you would either need two URL Link columns, or use "String" type columns, and use anchor tags with custom classes.
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
Hi Aleksandar,
I found out to set a fixed width for my columns.
Regarding question 2; is it also possible to use a custom image for the button? For example if I want the link to a Twitter account then I can use the twitter logo in each cell to be clicked?
Please let me know.
Regards,
Ruben
Hi again Ruben
Sure, you can do that with custom CSS, so you don't need to set the column as a URL, but instead as multi-line string.
When you add the column as a string, you will need to define the URL with an anchor tag. For example to open the link in a new tab, add the URL and the target:
After it, add the URL to the image, setting its size to be small enough to fit nicely in the cell:
So, to get a cell that looks like this, and takes the user to Huawei's Twitter profile:
You would need to use this code:
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