Hide table header row
Can you hide the header row of a table someway? The doesn’t seem to be a option for that.
I can’t find a way to inject css there either.
Solution:Jump to solution
While you may not be able to inject CSS to that part of the table, you can inject CSS elsewhere in the page that targets the selector of that element (if you can specifically identify it). A render-hook for (I think it's called)
page.style-end
could do it.4 Replies
I don't think so. There are a lot of things happening in the table header, so hiding that area could potentially break a lot of functionality.
If you're not using any sorting/searching/filtering capabilities, then I suppose you could use CSS to target the header row and hide it, but again, that might break things you weren't expecting.
Or you could explore using Grid/Split with your table, since that turns the table into "cards" instead of rows, and headers no longer apply in that context.
I don't know if #kenneth-sese-advanced-tables Advanced Tables plugin supports hiding header row, but worth looking at.
Yeah, the table where I want to do this, isn't really much of a table. Nothing is interactive. I'm just using it there because I like the layout that it has when grouping rows, which is perfect for what I wanted.
I don't think in my use case, hiding it with CSS would do any harm, but I didn't really see a way to inject CSS there either.
I'll take a look to both your suggestions, although at first glace in the docs of #kenneth-sese-advanced-tables , I don't see anything that would suggest that function.
Thanks a lot!
Solution
While you may not be able to inject CSS to that part of the table, you can inject CSS elsewhere in the page that targets the selector of that element (if you can specifically identify it). A render-hook for (I think it's called)
page.style-end
could do it.I’ll try that, thanks! There aren’t other tables in the same page so I guess I should be able to identify it.
Ended up adding a render hook as proposed and works perfectly. Thanks!