The first row in a table is converted to text when I hit 'publish'
The first row of all the tables that I include in my posts gets converted to plain text. The rest of the rows remain intact. The same happens if I include one or more tables. To show you what I mean here are two examples:
What happens to tables now:
What happened before:
The text “Winston-Salem Dash” in the 1st link (June 2 post) was the table’s first row before publishing. Like the text “Birmingham Barons” is the table’s first row in the 2nd post (May 30 post).
Any idea why this happens and how can I stop it from doing that?
The blog I need help with is soxbronzetitan.wordpress.com.
Your “first row” isn’t just a first row, it’s a row you had coded as a table heading. Apparently WP changed something and now the th tag won’t accept the colspan attribute. You can use this instead:
<td style="text-align:center;font-weight:bold;" colspan="12">Birmingham Barons</td>
You think this will be fixed? and soon?
imo, the header row is kinda important. Is there a way to change the background color of the row? I need it to stand out very prominently.
I used what you wrote me and it worked. Is the problem the colspan attribute or the th tag? The replacement has the colspan and it replaces th with td.
I did some testing and I found out after I push publish the th and the thead tags vanish. The original code was:
<th colspan="12">Winston-Salem Dash</th>
when I hit publish this becomes:
if I copy/paste your code in place of the plain text it works. I, also, found out that just changing th to td and leaving everything else as it is works fine:
<td colspan="12">Winston-Salem Dash</td>
Did WP develop an allergy to th? Should I alert someone? Any idea if WP will restore th tags? Or is this a feature and not a bug?
PS. I see now this:
The text in a th element is bold and centered.
The text in a td element is regular and left-aligned.
now I understand why you gave center and bold instructions in your code. If you don’t text won’t get centered, nor bolded since the th tag was replaced with a td tag
Thanks for the help.
@soxbronzetitan: You’re welcome.
The problem is that WP has messed things up. I just found another problem: if you write a plain, no frills, headings row, hitting Publish or Update will turn this:
into this nonsense:
@jpxasd: So for the moment you must avoid the heading tag altogether. You can use rows of regular cells only (td), and style them anyway you like – as in the example I gave to soxbronzetitan. For a row with some background color, the code would be this:
<tr style="background-color:#HEX HERE;"><td>etc etc etc
Ya, I’ve seen it turning multi-column into a single one… I was getting angry while trying to format my tables, lol. I couldn’t find out how to change the background color, so thanks for that!
I’ve also notified WP and they’re looking into it: https://en.forums.wordpress.com/topic/table-header-tags-stopped-working-will-this-be-fixed-soon
th tags are back this morning!
The topic ‘The first row in a table is converted to text when I hit 'publish'’ is closed to new replies.