Example #1
0
"><?php 
    echo relative_time(article_time());
    ?>
</time> by <?php 
    echo article_author('real_name');
    ?>
.
					</footer>
				</article>
			</li>
			<?php 
    $i = 0;
    while (posts()) {
        ?>
			<?php 
        $bg = sprintf('background: hsl(215, 28%%, %d%%);', round(++$i / posts_per_page() * 20 + 20));
        ?>
			<li style="<?php 
        echo $bg;
        ?>
">
				<article class="wrap">
					<h2>
						<a href="<?php 
        echo article_url();
        ?>
" title="<?php 
        echo article_title();
        ?>
"><?php 
        echo article_title();
<?php

theme_include('header');
?>

		<?php 
if (has_search_results()) {
    ?>
			<ul class="items">
				<?php 
    $i = 0;
    while (search_results()) {
        $i++;
        ?>
				<li style="background: hsl(215,28%,<?php 
        echo round($i / posts_per_page() * 20 + 20);
        ?>
%);">
					<article class="wrap">
						<h2>
							<a href="<?php 
        echo article_url();
        ?>
" title="<?php 
        echo article_title();
        ?>
"><?php 
        echo article_title();
        ?>
</a>
						</h2>