I am trying to apply a custom font to all my tables in wpDataTable via Custom CSS, I'd like to do two things:
1. I am trying to use the font Marine Light (https://www.encore/wp-content/uploads/2020/12/Marine-Light.ttf) as default to all my tables;
2. For the first column of every table, I am trying to use another custom font Marine Regular (https://www.encore/wp-content/uploads/2020/12/Marine-Regular.ttf)
Unfortunately, there's no way of applying the custom font with built-in features, so you would need to do it with custom CSS which is not included in the provided support for the plugin.
You can also add a custom CSS class to the first column, and define that class in wpDataTables settings/Custom JS and CSS/ field.
Thanks for getting back. I've applied the Custom CSS below which worked for the fields outside the Data Table, such as titles, paginations etc, but not for the table data.
This is coming from the "Material" skin CSS. Please go to /wp-content/plugins/wpdatatables/assets/css/wdt-skins/material.css and on line 14 remove "!important":
Hello,
I am trying to apply a custom font to all my tables in wpDataTable via Custom CSS, I'd like to do two things:
1. I am trying to use the font Marine Light (https://www.encore/wp-content/uploads/2020/12/Marine-Light.ttf) as default to all my tables;
2. For the first column of every table, I am trying to use another custom font Marine Regular (https://www.encore/wp-content/uploads/2020/12/Marine-Regular.ttf)
I was wondering if that is possible.
Thank you,
Rafael
Hello Rafael
Thank you for your interest in our plugin.
Unfortunately, there's no way of applying the custom font with built-in features, so you would need to do it with custom CSS which is not included in the provided support for the plugin.
You can also add a custom CSS class to the first column, and define that class in wpDataTables settings/Custom JS and CSS/ field.
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,
Thanks for getting back. I've applied the Custom CSS below which worked for the fields outside the Data Table, such as titles, paginations etc, but not for the table data.
Would you have any guidance how to solve this?
@font-face {
font-family: “Marine-Light”;
src: url((https://encore.am/wp-content/uploads/2020/12/Marine-Light.ttf)format(‘truetype’);¬
font-weight: normal;
}
@font-face {
font-family: “Marine-Regular”;
src: url(https://encore.am/wp-content/uploads/2020/12/Marine-Regular.ttf)format(‘truetype’);
font-weight: normal;
}
td {
font-family: Marine-Regular; }
th {
font-family: Marine-Regular; }
body {
font-family: Marine-Light; }
links {
font-family: Marine-Light; }
h1 {
font-family: Marine-Regular; }
h2, h3, h4, h5, h6, h7 {
font-family: Marine-Regular; }
Hi Aleksandar,
A quick update: I manage to style the table with:
table.wpDataTable tbody tr td{ font-family: Marine-Light!important; }
But the first row, remains in a different font. Any guidance?
Thanks,
Rafael
Hi again Rafael
Please try this:
If that doesn't work, please provide me the URL where I can see this table.
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,
Thanks for the support.
Nope, it didn't work. By the first row, I was meaning header actually.
Please find the link below:
https://www.encore.am/fundos/
Best,
Rafael
Ah, for header use th instead of td
So try this:
Let me know if that works.
I'm not on a PC now, so I couldn't test the code
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
It did! Thanks Aleksandar!
(and I also updated to premium) :)
Hi Aleksandar, quick follow up.
When I updated the plug-in to premium the CSS for the font stopped working. Any guess?
@font-face {
font-family: 'Marine';
src: url('https://encore.am/wp-content/uploads/2020/12/Marine-Light.eot');
src: local('Marine Light'), local('Marine-Light'),
url('https://encore.am/wp-content/uploads/2020/12/Marine-Light.eot?#iefix') format('embedded-opentype'),
url('https://encore.am/wp-content/uploads/2020/12/Marine-Light.woff2/Marine-Light.woff2') format('woff2'),
url('https://encore.am/wp-content/uploads/2020/12/Marine-Light.woff') format('woff'),
url('https://encore.am/wp-content/uploads/2020/12/Marine-Light.ttf') format('truetype');
font-weight: 300;
font-style: normal;
}
.wpDataTablesWrapper table.wpDataTable th {
font-family: Marine!important;
}
.wpDataTablesWrapper table.wpDataTable td {
font-family: Marine!important;
}
https://www.encore.am/fundos
Hello again Rafael
This is coming from the "Material" skin CSS. Please go to /wp-content/plugins/wpdatatables/assets/css/wdt-skins/material.css and on line 14 remove "!important":
So it looks like this:
That will allow you to change it through the custom code. I'll check with our developers if this can be removed for our next update.
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,
Great, it worked. Thank you for your superb help!
I think no we're sorted! :)
You're welcome, Rafael
Glad I could be of service.
If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.
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