I am trying to create a div with some content at the top of my wordpress blog ONLY if the user is on the first page of posts.
This is what I have:
<?php $pagenum = $wp_query->query_vars; ?>
<?php $pagenum = $pagenum['paged']; ?>
<?php
if($pagenum == 0) {
echo '<div id="bio">';
echo '<img src="' . bloginfo("template_directory") . '/img/gerry.jpg" />';
echo '</div>';
} ?>
For some reason it is returning a link to the template directory.
The problem seems to be with the line: echo ‘<img src="’ . bloginfo(“template_directory”) . ‘/img/gerry.jpg" />’;
Any ideas?
Thanks