• dekard

    (@dekard)


    With the help of Tyler from ontherocks comics, I’ve added this to my header.php for my theme and gotten the comics above the news.

    <?php
    $gposts = get_posts(‘numberposts=1’);
    foreach ($posts as $post) :
    ?>

    <?php echo ‘<img src=”‘ ?>
    <?php the_time(‘Y-m-d’) ?>
    <?php echo ‘.gif”/>’ ?>

    <?php
    endforeach;
    ?>

    My only issue now is, I’d like the images to only show for the news posts, not new pages. If I post a page today that doesn’t have a comic it shows a red x, because it’s looking for comic with todays date, I’d like to have a seperate header for pages that doesn’t include the php above, but unsure how to use 2 different headers.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘2 headers? Quick question’ is closed to new replies.