Thread Starter
cpkid2
(@cpkid2)
Thank you for your time, esmi. However, for some reason only one post + one dummy image post is showing.
Here is my full code: http://pastebin.com/5kVU6GMC (I changed it to query 4 posts instead of the original 6)
In the output, only one post and one dummy post shows instead of having one post and three dummy posts showing.
Any ideas?
I can see why. You need another looping structure to pick up where the primary Loop stopped. Try http://pastebin.com/Gu6Mie6A
Thread Starter
cpkid2
(@cpkid2)
I get an unexpected semicolon on line 32.
Parse error: syntax error, unexpected ';', expecting ')' in blog.php on line 32
Thread Starter
cpkid2
(@cpkid2)
I changed line 32 from:
<?php if( $c < 4 ) : for ($dummy= $c; $dummy < 5; $dummy++;) : ?>
to:
<?php if( $c < 4 ) : for ($dummy= $c; $dummy < 4; $dummy++) : ?>
I removed the last semicolon and it seems to be working now. Also, I’m wondering why there was a ‘5’ in the original line instead of ‘4’? Is that necessary for the code to work or was it a mistake? It outputted 5 boxes so I changed it to 4 and it’s working now.
It was all very much off the top if my head. If 4 works, go for it. 🙂