• Resolved patoel

    (@patoel)


    Hi,

    I have made php snippet to load table press with this code

    <?php tablepress_print_table('id=44&datatables_fixedheader=top&datatables_fixedheader_offsettop=150&print_name=false' ); ?> 

    it work properly when load on the page, but sticky not work also can you help how can made table responsive if we using in snippet like this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    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!

    Regards,
    Tobias

    Thread Starter patoel

    (@patoel)

    Hi Tobias,

    Here’s the page that used tablepress https://test.liquideye.net/c2080-housing-for-canon-cameras/

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for the link!

    The reason for this is that your site does not have access to the Fixed Header and Responsive Tables feature modules for TablePress, as these requires a premium license.
    However, even with that, there’s a limitation in the table structure: For these features to work (except for Horizontal Scrolling), the table can not have any merged/combined cells, so that you would have to remove all #colspan# and #rowspan# from the table cells.

    Regards,
    Tobias

    Thread Starter patoel

    (@patoel)

    Hi,

    Thanks for your info, if i buy a premium license how can i used is in php snippet?

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    the PHP snippet from your first post is also supported in the premium version (even though these “Template Tags” are less and less relevant with modern block themes, where the “TablePress table” block or a Shortcodes are often easier to use).

    However, the more important thing for you to “solve” will be to find a table structure without any combined/merged cells. This is also required with the Premium version.

    Regards,
    Tobias

    Thread Starter patoel

    (@patoel)

    Hi,

    Yes for that combine/merged I just leave it so its ok without sticky header, can i like this code below for responsiveness?

    <?php tablepress_print_table('id=44&responsive=scroll&responsive_breakpoint=”phone”&print_name=false' ); ?> 
    • This reply was modified 1 year, 10 months ago by patoel.
    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, this PHP code will work for this ?? But you would have to use proper quotation marks around phone or remove them!

    By the way, you could maybe write this a bit more nicer and more readable like this:

    <?php
        tablepress_print_table( array(
            'id' => '44',
            'responsive' => 'scroll',
            'responsive_breakpoint' => 'phone',
            'print_name' => false,
        ) );
    ?>

    Regards,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Made tablepress sticky on table header and responsiveness’ is closed to new replies.