I am trying to detect each 4th post to insert extra code in my layout in wordpress using modulus method but I just cant get it.
Here is a short example of mine:
When it comes to things like this, I always increment one on the if statement before calling modulo like so:
if(($count+1)%4 == 0)
This way it's easy for me to make a mental note that the statement naturally reads "if the current count is the 4th one then do:"