Im struggling structuring my blog post layout. I need to be able to put a form between all my article blog post. I'm not sure how to put the form between all of the post. I'm not sure if this making sense but heres my code. My CSS parents I used flex box
Right layout:
Wrong layout currently I have:
Here's my code:
You store the data in a array variable from the_post() query. You will get the array length and you can use looping such as for loop or while loop. Example:
for ($i=0; $i < $array_length ; $i++) {
if ($i == 1){
//Here you can write the form block
}
else{
//continue to write the post block
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.