Sticky Header Row
-
TablePress is by far a superior way in which to manage tables a WorPress installation, thank you for the excellent plugin.
As such, is there a manner in which the code could be altered to make the header row of a Table sticky, whereby when one scrolls down through a long table the header is always right in view?
This would be a feature similar in function to “Freeze Row” found in MS Excel.
-
Hi,
thanks for your post, and sorry for the trouble.
Something like this is possible with this TablePress Extension: http://tablepress.org/extensions/datatables-fixedheader/
Regards,
TobiasTobias,
I didn’t want to start a new thread as I believe this question fits here –
It appears that if you use the fixed header then you cannot use sorting. Is that correct?
Hi Bob,
no, that should work fine together.
Regards,
TobiasSorry about that. Had to delete the cache and reset the site, and now it’s working fine. Thanks for the help.
Hi,
no problem! Good to hear that it’s working now!
Regards,
TobiasTobias, will this extension work with multiple tables on the page with different headers?
For example, I could really use sticky headers here:
http://www.hippressurecooking.com/pressure-cooking-times/Thanks!
L
P.S. I almost never have to ask. I usually find exactly what I need, like this sticky header, with a google search. I’m so glad that this plug-in is so well supported and documented. THANK YOU!!
Hi,
thanks for your question!
Yes, the Extension will work fine even with multiple tables on the page. When a table “ends” (i.e. one scrolls below it), that fixed header just disappears.
Regards,
TobiasThanks Tobias, I tried it and it didn’t work. Nothing happened. I installed the plug-in, cleared all of my caches and shift-reloaded the browser, cleared all files and cookies from my browser.
I wonder if it has to do with cloudflare caching some changed javascript? What additional file(s) should I clear from that cache to see the sticky header?
Ciao,
L
Hi,
Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!
In the page in your link above, the tables are not using the DataTables JS library (which is required to be turned on, but the individual features can be turned off), and it appears that the Extension is not activated as a WordPress plugin?Regarding the caching: I suggest to try to make it work with all caching deactivated at first. If that works, one can step by step turn caching back on.
Regards,
TobiasYes, it’s that page. I’m using plug-in organizer and have the extension plug-in turned off globally and turned on only for that page. Will try turning it on “globally” and see what happens.
I run a lot of plug-ins and some authors make the scripts load on EVERY page so I use the organizer to mitigate for that.
Ciao,
L
Hi,
so far, I don’t see a change on that page, so something is either not activated/enabled or being removed/hidden again by another plugin.
Regards,
TobiasHmmm… I tried turning off Plugin Organizer, and that didn’t do anything. Then I turned the organizer back on and disabled every plugin on that page (using the organizer) and only left tablepress and the extension on and that didn’t work either.
In the meantime I bypassed the Server, HTML and Cloudflare caches and lowered the browser cache to 2 hours (that’s as low as I could go) but still, nothing.
I really don’t know what else to try.
Ciao,
L
Hi,
please check:
– Are the Extensions really activated as WordPress plugins?
– Do the table have the “Use DataTables” checkbox enabled? (Individual feature like sorting, etc. can be turned off.)
– Did you add the necessary Shortcode parameters? (Please check this in the “Text” and not the “Visual” editor on the “Edit” screen of the page.)
– Does your theme contain a call towp_head();in its header.php and a call towp_footer();in its footer.php?Regards,
TobiasAHA! That was it!
I did not have “Use Data Tables” checkbox enabled. Now the headers are finally sticking!! I apologize I don’t think I read about having that box checked but of course now it makes total sense.
Thanks,
L
Hi,
no problem, you are very welcome! 🙂 Good to hear that this helped!
Best wishes,
TobiasP.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!
The topic ‘Sticky Header Row’ is closed to new replies.