I have a list with a URL in one column. I don't want to just display the URL because it look bad. I would like to do a conditional image. If it is LinkedIn it shows that Image. If it is Wikipedia it shows that image.
Can some please help me know what the best way to do this is?
This could be done, of course. I'm guessing you're looking for something like this:
So, when a user clicks on the icon - it takes them to the user's profile on that network, correct?
Now, to do this, you'd need to upload the icons to your WordPress' Media Library. When you open it, you'll find the URL to the icon (see attachment).
In order to make that a clickable link, the column's type needs to be set as "String", and editor input type "One-line edit" or "Multi-line edit". Now, when you're adding a row, the cell needs to look like this:
Okay I'm not the perfect CSS programmer.
I have a list with a URL in one column. I don't want to just display the URL because it look bad. I would like to do a conditional image. If it is LinkedIn it shows that Image. If it is Wikipedia it shows that image.
Can some please help me know what the best way to do this is?
Thank you,
Zarilla
I'm doing this so that people cannot just cut and paste the entire URL list.
Hello zarilla.
Thank you for your purchase.
This could be done, of course. I'm guessing you're looking for something like this:
So, when a user clicks on the icon - it takes them to the user's profile on that network, correct?
Now, to do this, you'd need to upload the icons to your WordPress' Media Library. When you open it, you'll find the URL to the icon (see attachment).
In order to make that a clickable link, the column's type needs to be set as "String", and editor input type "One-line edit" or "Multi-line edit". Now, when you're adding a row, the cell needs to look like this:
It probably won't work in back-end, but in front-end it works flawlessly.
Please let me know if this helps.
Best regards.
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