Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8717903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:24:08+00:00 2026-06-13T06:24:08+00:00

I’m building a WordPress theme based around Twitter Bootstrap. With Bootstrap’s responsive layout .row-fluid

  • 0

I’m building a WordPress theme based around Twitter Bootstrap. With Bootstrap’s responsive layout .row-fluid spans 100% of the page and can have 12 ‘spans’ within one row.

<div class="row-fluid">
    <?php query_posts('category_name=feature-articles&showposts=6'); ?> 
    <?php while (have_posts()) : the_post(); ?>

        <div class="span4">
        <div class="main-thumb"><?php echo get_the_post_thumbnail(($page->ID) , 'main-thumb'); ?></div>
        <a href="<?php the_permalink(); ?>"><h3 class="title"><?php the_title(); ?></h3></a>
        <p class="excerpt"><?php
            $my_excerpt = get_the_excerpt();
            if ( $my_excerpt != '' ) {
                // Some string manipulation performed
            }
            echo $my_excerpt; // Outputs the processed value to the page
            ?></p>


    <?php endwhile; ?></div>

This creates 6 “span4”, which I want to span across 2 different rows – but because of the loop, there’s no way to close the original .row-fluid div and open another after 3 posts have been created.

For simplicity’s sake, I want to get posts 1, 2 and 3, then close the .row-fluid div and create another, then get posts 4, 5 and 6. Is this possible with a bit of loop manipulation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:24:09+00:00Added an answer on June 13, 2026 at 6:24 am

    You’d have to put a counter in the loop, and when it reaches 3, add a close/open tag. I’ve also added if(have_posts()) to the start of your loop, to avoid errors (also allows you to output a message if there are no posts).

    <div class="row-fluid">
    
        <?php $i = 0 ?>
        <?php query_posts('category_name=feature-articles&showposts=6'); ?>
        <?php if(have_posts()) : while (have_posts()) : the_post(); ?>
    
            <?php if( $i == 3 ) : ?>
                </div>
                <div class="row-fluid">
            <?php endif; ?>
    
            <div class="span4">
    
            <div class="main-thumb">
                <?php echo get_the_post_thumbnail(($page->ID) , 'main-thumb'); ?>
            </div>
            <a href="<?php the_permalink(); ?>">
                <h3 class="title"><?php the_title(); ?></h3>
            </a>
            <p class="excerpt">
    <?php
                $my_excerpt = get_the_excerpt();
                if ( $my_excerpt != '' ) {
                    // Some string manipulation performed
                }
                echo $my_excerpt; // Outputs the processed value to the page
    ?>
            </p>
    
            <?php $i++ ?>
    
            <?php endwhile; ?>
        <?php endif; ?>
    
    </div> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a small JavaScript validation script that validates inputs based on Regex. I
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I'm making a simple page using Google Maps API 3. My first. One marker
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.