Title: Fixed Header Plugin Not Executing
Last modified: October 11, 2021

---

# Fixed Header Plugin Not Executing

 *  Resolved [Raul Flores](https://wordpress.org/support/users/raflo64/)
 * (@raflo64)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/fixed-header-plugin-not-executing/)
 * I installed the **TablePress Extension: DataTables FixedHeader** plugin and added
   the following to the Plugin Options, per a previous topic that is now closed.
 * .tablepress.fixedHeader-floating {
    z-index: 1000 !important; }
 * However, I still am unable to get the header on the first table (the only one
   I am testing) to remain fixed.
 * We are a public transit agency and our time schedules for riders have always 
   been downloadable PDF files. This is my first attempt at making the schedules
   live on the web site. I am only testing the first table (Route 2 Weekday Southbound),
   but we have 90+ routes. Many, like the one i am testing have multiple days (Weekday,
   Weekend, Saturday only, Sunday only) and directions (Southbound, Northbound, 
   Westbound, Eastbound), so there could be close to 300 tables.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffixed-header-plugin-not-executing%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/fixed-header-plugin-not-executing/#post-14960156)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Just to be sure: Did you add the new required parameter to the Shortcode for 
   the table on this page, as explained on [https://tablepress.org/extensions/datatables-fixedheader/](https://tablepress.org/extensions/datatables-fixedheader/)
   
   Unfortunately, I could not directly check this, as the page from your link seems
   to be password-protected.
 * Regards,
    Tobias
 *  Thread Starter [Raul Flores](https://wordpress.org/support/users/raflo64/)
 * (@raflo64)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/fixed-header-plugin-not-executing/#post-14960184)
 * Hello Tobias,
 * Thanks for the reply. In answer to your question, yes I added the shortcode; 
   I added the offset as well since I have a navigation bar. And I also have a shortcode
   for responsive scroll. So it looks like this:
 * [table id=389  datatables_fixedheader=top datatables_fixedheader_offsettop=160
   responsive= scroll /]
 * I did try the shortcode without the responsive scroll just to see if it would
   work.
 * I have temporarily removed the password protection, but changed the url just 
   to make a little less conspicuous on the site.
 * [https://www.viainfo.net/test_10112021/](https://www.viainfo.net/test_10112021/)
 * Thanks, RAF
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/fixed-header-plugin-not-executing/#post-14961276)
 * Hi,
 * thanks for that! The reason why the FixedHeader is not working is that your tables
   use the `#colspan#` keyword to merge/connect cells (in their last rows). Unfortunately,
   the external DataTables JavaScript library and the FixedHeader JS code are not
   compatible with that. They require that a table does not have merged/connected
   cells.
    Thus, to use the FixedHeader, you’d have to remove all `#colspan#` from
   these tables.
 * However, even if you did that, the FixedHeader will likely not work as desired,
   due to the tables being shown inside collapsable/expandandable sections. Using
   those essentially means that the table is initially hidden, which means that 
   the JS code can not make certain calculations, like column widths, etc. Thus,
   the floating header cells will not be matching the actual column positions.
 * The latter might change in the future, with an update of the FixedHeader JS code,
   but unfortunately, I’m not aware of a solution that’s already available now 🙁
   Sorry.
 * Regards,
    Tobias
 *  Thread Starter [Raul Flores](https://wordpress.org/support/users/raflo64/)
 * (@raflo64)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/fixed-header-plugin-not-executing/#post-14963006)
 * Thanks Tobias,
 * I removed the #colspan# from the tables, and they appear to be working even with
   the collapsable sections. I’ll figure out a workaround on the 4 rows that had
   the #colspan# on them.
 * Perhaps I’ll test creating and adding a second table just below the primary with
   those four rows, since the information for each route is different.
 * I’ll keep you posted.
 * But thanks for your expertise and help.
 * Cordially, Raul
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/fixed-header-plugin-not-executing/#post-14963861)
 * Hi Raul,
 * awesome! That’s great to hear, especially with the header still working despite
   of the collapsable sections!
 * Yes, moving that information to a separate small table would be an option. Or,
   you could just add it as normal text below the table, e.g. in the table description,
   which you could have printed below the table.
 * Regards,
    Tobias
 *  Thread Starter [Raul Flores](https://wordpress.org/support/users/raflo64/)
 * (@raflo64)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/fixed-header-plugin-not-executing/#post-14963900)
 * Hello Tobias, I never even thought about the description field and displaying
   it at the bottom. I tried that, and it works like a gem. Saves the trouble of
   having to create a second table and keeping track of which secondary table goes
   with the primary table.
 * Plus, I can use standard HTML code to adjust the size, alignment, etc.
 * Thanks again for all your help.
 * Cordially, RAF
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/fixed-header-plugin-not-executing/#post-14963983)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
    Tobias   P.S.: In case you haven’t, please rate TablePress [here](https://wordpress.org/support/plugin/tablepress/reviews/#new-post)
   in the plugin directory. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Fixed Header Plugin Not Executing’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/fixed-header-plugin-not-executing/#post-14963983)
 * Status: resolved