Hi, I would like to remove the header on some tables I have but not all of them.
I found that information :
This will be affected on all tables, but if you want just for specific one then insert this code on the page where is that table between the style tag (<style>Code here</style>
I will advise you on different ways how you can hide Column Headers.
We will start from the easiest way, to just hide all headers of a specific Table on a WP Page, then we will go over some 'more advanced' ways how you can choose to hide just specific Headers on a Table, etc.
1. If you wish to hide all Headers on a specific Table, and if this table will be on its own on the WP Page, then the CSS you already found does the trick.
Custom code needs to be applied to the page where the booking form is. Depending on what you're using (Gutenberg blocks, or some page builder), adding the CSS or JS can be done in a few different ways.
If you need help with adding custom CSS to the page, please take a look at this article.
Here is my example, I will just go to my Page with the Table, then go to the Theme's Customize section ( i use Astra Theme for this example) and here I an add "Additional CSS".
Then publish the change, and that's it.
-
2. If you wish to 'target' a specific Table ID only, do this :
Hi, I would like to remove the header on some tables I have but not all of them.
I found that information :
This will be affected on all tables, but if you want just for specific one then insert this code on the page where is that table between the style tag (<style>Code here</style>
But I don't know where can I find the page code ? I'm using elementor Pro.
Can you help me ?
Thanks a lot
Hello,
I will advise you on different ways how you can hide Column Headers.
We will start from the easiest way, to just hide all headers of a specific Table on a WP Page, then we will go over some 'more advanced' ways how you can choose to hide just specific Headers on a Table, etc.
1. If you wish to hide all Headers on a specific Table, and if this table will be on its own on the WP Page, then the CSS you already found does the trick.
Use this custom CSS code :
Custom code needs to be applied to the page where the booking form is. Depending on what you're using (Gutenberg blocks, or some page builder), adding the CSS or JS can be done in a few different ways.
If you need help with adding custom CSS to the page, please take a look at this article.
Here is my example, I will just go to my Page with the Table, then go to the Theme's Customize section ( i use Astra Theme for this example) and here I an add "Additional CSS".
Then publish the change, and that's it.
-
2. If you wish to 'target' a specific Table ID only, do this :
Just change the 1 to your Table ID.
3. This is a workaround if you wish to try just hiding some specific Column Headers, while leaving others visible :
Add a custom CSS class in the Column's Display settings, for each column we wish the header to "hide".
I will name the class "hideHeader" , but you can name it anything you wish.
Then add this CSS into your custom CSS tab:
So now, any Column that has that class is going to hide it's Header.
Let me know how it goes and if you have any questions.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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