[LifeStream Plugin] Split stream into two columns
-
Hi ! I’ve recently downloaded a WordPress theme (Iressistible) which features a “Lifestream” widget. Everything works great, I can see my tweets. But the thing is I would like to split my lifestream into two columns in this box. Here’s what I’ve managed to do so far : https://www.willandco.fr/lifestreambox.png
In fact I just created 2 CSS class to get 2 columns, and then in the message.inc.php file I duplicated the code to get in each column the same feed. This is the code I get :
:<div class="left"> <div class="lifestream_meta"><abbr title="<?php echo date("c", $event->timestamp); ?>" class="lifestream_hour"><?php echo date('D d M , G:i:s', $event->timestamp); ?></abbr></div><?php foreach ($event->data as $chunk) { ?> <div class="lifestream_label"> <?php if ($lifestream->get_option('show_owners')) { echo $label_inst->get_user_label().': '; } ?><?php echo $this->render_item($event, $chunk); ?></div> <?php if ($show_metadata) { ?> <?php } ?> <?php } ?> </div> <div class="right"><div class="lifestream_meta"><abbr title="<?php echo date("c", $event->timestamp); ?>" class="lifestream_hour"><?php echo date('D d M , G:i:s', $event->timestamp); ?></abbr></div><?php foreach ($event->data as $chunk) { ?> <div class="lifestream_label"> <?php if ($lifestream->get_option('show_owners')) { echo $label_inst->get_user_label().': '; } ?><?php echo $this->render_item($event, $chunk); ?><?php if ($show_metadata) { ?></div> <?php } ?> <?php } ?> </div>
What I would like to do now is to split the stream into two columns, I mean I want to read in the left column the first 4 results, and on the right column the 5-8 results. How could I do that ? I’ve searched on the plugin homepage and the creator gives this following code (https://www.ibegin.com/labs/forums/index.php?topic=120.0) :
// this will return results 20-40 from your lifestream, perfect for pagination $results = lifestream_get_events(array( 'offset' = 20, 'number_of_results' = 20, 'date_interval' = -1, ));
So this code should display results 20 to 40 of my stream. I guess I could use this to display in one column results 1 to 4 and on the other 5 to 8 right ? But where should I paste this code ? I really don’t know much about PHP, so if someone could give me some help that would be awesome ! Thanks ??
- The topic ‘[LifeStream Plugin] Split stream into two columns’ is closed to new replies.