Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS WordPress Custom Loop

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #45760
    TWG
    Participant

    I’ve got the following loop working great except I’m a little help on how to add a leading div with class row before three items and a closing div after them until it reaches the end.

    $wp_query = null;
    $wp_query = new WP_Query();
    $wp_query->query(‘cat=4’);
    ?>
    have_posts() ) : $wp_query->the_post(); ?>

    ID, ‘full’); ?>

    “>


#139948
pixelgrid
Participant

try this

$wp_query = null;
$wp_query = new WP_Query();
$wp_query->query(‘cat=4’);
?>
div class=”row”>
have_posts() ) : $wp_query->the_post(); ?>

ID, ‘full’); ?>

“>

$i++; endwhile; // end of the loop. ?>

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.