[loop] and HTML
-
I am not sure if it is the ‘WYSIWYG’ editor mucking up what I am trying to do, or if it is something with saving the page and how it is escaping HTML codes, or what, but here is my situation:
This is the code I have, which is quite simple:
<table style="width: 100%;" cellspacing="15" cellpadding="15"> <tbody> [loop type='post' category='Products'] <tr> <td colspan="2" align="center"> <h2> <strong> <span style="text-decoration: underline;"> [content field='title'] </span> </strong> </h2> </td> </tr> <tr> <td width="25%" align='center'> <img style="width: 100%; max-width: 150px;" alt="" src="[content field='image-url']" /> <br > [content field='cart_Price'] </td> <td> [content] </td> </tr> <tr> <td colspan="2"> <hr /> </td> </tr> [/loop] </tbody> </table>
I input that into the content of a page, on the ‘text’ tab, not the ‘visual’ tab of the editor. I save it, look at it on the front end and everything appears exactly how it should, all laid out nice and pretty in a table, etc. However, if I go to edit that page again, the editor moves my [loop] tags and it looks like this in the editor:
[loop type='post' category='Products'][/loop] <table style="width: 100%;" cellspacing="15" cellpadding="15"> <tbody> <tr> <td colspan="2" align="center"> <h2><strong> <span style="text-decoration: underline;"> [content field='title'] </span> </strong></h2> </td> </tr> <tr> <td align="center" width="25%"><img style="width: 100%; max-width: 150px;" alt="" src="[content field='image-url']" /> [content field='cart_Price']</td> <td>[content]</td> </tr> <tr> <td colspan="2"> <hr /> </td> </tr> </tbody> </table>
I need to move the opening and closing loop tags back to where they belong every time I make any changes (which right now is quite often, as I am in the process of building this page).
Is there something with the WYSIWYG editor that is causing this? Or perhaps something with WP and how it saves the contents of the page?
For what it is worth, I have disabled any MCE Plugins that were installed (TinyMCE, UltimateMCE, Black Studio TinyMCE, etc)
- The topic ‘[loop] and HTML’ is closed to new replies.