Problem with 'thead' – is it theme related?

Posted in: Newspaper
Post count: 60

Hi,

For some reason when I switch from ‘text’ to ‘visual’ on the post creation page, WordPress is breaking the content inside ‘thead’ (table headings)

I spent some time researching why this could be happening, and I found a reference to it on Stackoverflow that suggested it was theme related:

  • “I found what it was. There was a theme setting to not allow certain tags. Not sure why that exists, but it was there :D”
  • Please see this screenshot demonstrating the issue.

    Thanks

    Post count: 23312

    Hello GadgetViper,

    Please notice that until now we do not have any bad reports in this regard and we cannot provide any response in this case because I cannot recreate this issue, sorry! Please ensure that you are using the latest version of the theme and required plugins (Visual Composer 4.11.2 and Social Counter 4.1) and also, the latest version of WordPress (v.4.5.3). Clear all your caches and check again.
    So, if your problem is still there, please try to switch your theme to a default one and check the behaviour in this case. For more details, you can make a mini-video so I can see what happens this problem.

    Thanks for your understanding!

    Post count: 60

    Hi Catalin,

    Thanks for taking the time to respond. I’ve managed to find a work around using CSS.

    I ended up removing the ‘thead’ and ‘th’ table.

    I switched this:


    <thead>
    <th>Brand</th>
    <th>Model No.</th>
    <th>Capacity</th>
    <th>USB ports</th>
    <th>Max output</th>
    <th>Price*</th>
    <th>Buy Online</th>
    </thead>

    To this:


    <tr class="hide-mobile hbold">
    <td>Brand</td>
    <td>Model No.</td>
    <td>Capacity</td>
    <td>USB ports</td>
    <td>Max Output</td>
    <td>Latest Price*</td>
    <td>Buy Online</td>
    </tr>

    Then I created a CSS class for the ‘tr’ (hide-mobile) that hides the top header row when the table collapses on mobile views.

    Think it works pretty well when you reduce the page width, you can see it working here – http://gadgetviper.com/best-power-bank-20000mah-review/

    The important thing is that I can toggle between visual view and html when editing the post in WordPress without it breaking the tables 🙂

    Post count: 6535

    Hi

    Glad you have managed to find a solution on this.
    Thanks for letting us know and for your message.

    Viewing 4 posts - 1 through 4 (of 4 total)
    You must be logged in to reply to this topic.