Post a table on Wordpress

Hi,

I need to post a table on a wordpress Post. I have the table built in HTML with the string functions and I’m passing it in the content field of the wordpress create a post module.

Wordpress will delete the HTML though and only text gets posted. What am I doing wrong?

<html><table border="1" cellspacing="0" cellpadding="5">
  <thead>
    <tr>
      <th>Datum</th>
      <th>Titel</th>
      <th>Beschreibung</th>
      <th>Ort</th>
      <th>Link</th>
    </tr>
  </thead>
  <tbody>
    <tr>
  <td> 10.02.2025 14:30 </td>
  <td> TerminTitel1 </td>
  <td> Termin Beschreibung. Langtext. </td>
  <td> www.google.de</td> 
 <td>
</td>  
</tr>
<tr>
  <td> 10.02.2025 17:00 </td>
  <td> TerminTitel2 </td>
  <td> Termin Beschreibung. Langtext. </td>
  <td> </td> 
 <td>
</td>  
</tr>
<tr>
  <td> 17.02.2025 14:30 </td>
  <td> TerminTitel4 </td>
  <td> Termin Beschreibung. Langtext. </td>
  <td> www.google.de</td> 
 <td>
</td>  
</tr>
<tr>
  <td> 19.02.2025 06:00 </td>
  <td> TerminTitel3 </td>
  <td>  </td>
  <td> </td> 
 <td>
</td>  
</tr>
<tr>
  <td> 23.02.2025 17:00 </td>
  <td> TerminTitel5 </td>
  <td>  </td>
  <td> </td> 
 <td>
</td>  
</tr>

  </tbody>
</table></html>

@Matze, what happens when you post the same content through your WP admin? I doubt the theme has some filter or a plugin feature that seems to strip all the HTML tags.

If I switch to HTML, I can paste the exact code and it works perfectly. It seems like the module can’t use HTML even though I saw some postings hinting that it can. I would be happy with any other way to post a table though.

Found it. It was a pretty anoying error. I created several text compose modules for different reasons and I picked the wrong one. Sry.

3 Likes