Thread Starter
nzahn
(@nzahn)
All right … solved it; if someone is interested here is the fixed code:
In the loop
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php $content = $post->post_content;
$paragraphs = explode(‘<p>’, $content);
$i = 0;
foreach ($paragraphs as $number){
$i++;
$q = $i – 1;
if ($i == 0) {
echo $q.$number;
}
}?>
<?php endwhile; else: ?>
<p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p>
<?php endif; ?>
simple enough? btw. this does column splitting by <p> can be any tag though; hope this helps anyone.
Hi thepaperdump, I was wondering how you made it so that the template in the gallery attached to the post? I am trying to solve it and I am not getting further …
Jiahadye, thank you for this info, however I was wondering how do you populate the id for the slideshow from the post id? With a MySQL SELECT clause?