php - Auto generate row with Twitter Bootstrap in Wordpress -


Good morning, I found myself in a dilemma! I am creating a WordPress theme using Twitter Bootstrap and I am generating members for Wordpress "Posts" via the "Meeting Team" page. I can fit 3 entries in just 1 row ... IE

  & lt; Div class = "row" & gt; & Lt; Div class = "span 4" & gt; & Lt; / Div & gt; & Lt; Div class = "span 4" & gt; & Lt; / Div & gt; & Lt; Div class = "span 4" & gt; & Lt; / Div & gt; & Lt; / Div & gt;   

But 3 entries per line will now break the line, so I need to create a new line for every 3 entries. How can I do this?

Here is my PHP code to output entries.

  & lt ;? Php query_posts ('category_name = members & orderby = date'); ? & Gt; & Lt; Div class = "line-fluid" & gt; & Lt; Ul square = "thumbnail" & gt; & Lt ;? Php if (have_posts ()): while (is_pause ()): the_post (); ? & Gt; & Lt; Li class = "span 4" & gt; & Lt; Div class = "thumbnail" & gt; & Lt ;? Php // Check that the post thumbnail in the post has been specified this. this. P_ty_thumbnail (); ? & Gt; & Lt; Div class = "pad" & gt; & Lt; H3 & gt; & Lt ;? Php the_title (); ? & Gt; & Lt; / H3 & gt; & Lt ;? Php the_content (); ? & Gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Li & gt; & Lt ;? Php timeline; ? & Gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt ;? Php endif; ? & Gt;    

try it

  & lt; Php query_posts ('CATEGORY_NAME = members & orderby = date'); ? & Gt; & Lt; Div class = "line-fluid" & gt; & Lt; Ul square = "thumbnail" & gt; & Lt ;? Php $ cnt = 0; If (is_pause ()): while (is_pause ()): the_post (); If ($ cnt% 3 == 0) {echo "  


Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -