I am trying to build my own loop based on loop-tcp-grid.php.
I noticed that the case where there are no posts to match results in a table with just a </tr> tag.
Then, the case where columns requested is 1 and there is 1 product will result in a table with an extra </tr> tag.
I solved this in my version by putting a <tr> tag with the <table> tag, and giving it a class of “first-row” (so I can adjust borders easily). Then start the $column variable at the columns requested. In the check for $column==0 at the top, I echo the </tr> as well as the <tr>. And I removed the check for $column==0 at the bottom of the loop.
- The topic ‘Malformed HTML in loop-tcp-grid.php’ is closed to new replies.