Adding html to php (Infinite Scroll related)
-
Hi Everyone,
I’ve known this forum to be super helpful so I’m asking a question that is somewhat relevant to Jetpack Infinite Scroll. I’ve managed to combine Date grouping with infinite scroll on my website (battledomination .com). The only problem is that I don’t know where/how to add echo to the part of code that will force the date to appear on it’s very own line. You’ll notice how the date shows up in awkward places on my site. Here is the code:
<?php
$date = 0;
$newDate = true;
if (have_posts()) : while (have_posts()) :
the_post();if ($date == 0)
$date = the_date();
else if ($date != the_date()) {
$date = the_date();
$newDate = true;
}if ($newDate)
echo $date . ”;$newDate = false;
echo ”;
get_template_part(‘item-video’);
endwhile;
endif;
?>
- The topic ‘Adding html to php (Infinite Scroll related)’ is closed to new replies.