Site logo

Archived topic

Table not responsive using hook element

7 replies · Started by Mathieu on June 8, 2022

Viewing posts 1–8 of 8

Hello generatepress team,

I've been trying for a while to put a table via a gutenberg block on the homepage of my site, using an Element > Hook

It works perfectly on desktop, but my tables are not responsive on mobile. I tried to modify the CSS, but still, impossible to be responsive.

Then i tried to work around the problem, using a plugin like "Tablepress" : same result > not responsive on the homepage

However, my tables look responsive on other pages than homepage, where i've been using a shortcode without going through Element > Hook.

Could it be possible that the CSS doesn't work if the element is called via Hook? Is there any way to solve it ? (with or whitout plugin)

Many thanks !

Hi Mathieu,

Could it be possible that the CSS doesn’t work if the element is called via Hook?

Don't think so. Can you show me one page that the shortcode works and the table is responsive so I can compare the 2 tables?

Are you using a shortcode to insert the table for homepage/blog as well? Are you using a block element - hook or a hook element?

Hi Ying,

Thanks for your answer !
I just send you in the private information form 2 links :

* On my post link : table display is perfect, i mean responsive on my mobile phone
* On my Homepage ling : the exact same table, using same shortcode, is not responsive

(those tables are made with "Tablepress plugin", but i've got exactly the same troubles using generatepress table)

Many thanks for your help
Mathieu

Looks the homepage is missing some CSS.

Can you try the following steps:

1. Clear cache, then disable your cache plugin.

2. If NO.1 works, this one is not needed: Use a hook element (tick the execute shortcode box )instead of a block element.

but i’ve got exactly the same troubles using generatepress table)

I haven't heard of GenratePress table, I suppose it's not our product.

Let me know!

i desactived cache plugin and no changes.
Then i deleted block element, created a hook element with the same shortcode ([table id=1 responsive=stack /]) as the "ok page" :
https://prnt.sc/zWqH9ty8sGb6

For any reason, CSS still looks missing !

Hmm I'm guessing that TablePress only loads the CSS when it's inserted in static pages and single posts but not in Elements which is a custom post type.

Can you check with their support team if there are any special instructions when used in CPT?

Thanks!

Ok then, thanks Leo !
i'll contact them and if there is no solution, i guess i'll have to switch my homepage from to static page !

I would be surprised is there is no solution :)

This archived topic is closed to new replies.