Support » Themes and Templates » Vigilance theme – change header

  • Resolved Jack


    Hi, I was wondering if anyone could help me change the header on my blog from text to an image. I am using the Vigilance theme and have an image ready to use as the header. I tried editing the header.php file but it messed everything up…so if anyone has advice I’d love to hear it.

    Thanks in advance!

    My blog is

Viewing 7 replies - 1 through 7 (of 7 total)
  • Try this
    <a href="<?php echo get_settings('home'); ?>" title="<?php bloginfo('name'); ?>"><img src="<?php bloginfo('template_directory'); ?>/pathToImage/logo.png"/></a>
    just replace /pathToImage/logo.png with the path to your logo



    Thanks!!! I’ve only dealt with CSS & HTML, so I’m not exactly sure where to put it and what to delete. I tested it out, and it goes somewhere in here, could you tell me where?:

    <?php get_header(); ?>
    	<?php if (have_posts()) : ?>
    	<?php while (have_posts()) : the_post(); ?>
    		<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    			<div class="post-header">
    				<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    				<div class="date"><span><?php the_time( 'Y' ); ?></span> <?php the_time( __( 'F j', 'vigilance' )); ?></div>
    				<div class="comments"><?php comments_popup_link( __( 'Leave a comment', 'vigilance' ),  __( '1 Comment', 'vigilance' ), __ngettext ( '% Comment', '% Comments', get_comments_number (),'vigilance' )); ?></div>
    			</div><!--end post header-->
    			<div class="meta clear">
    				<div class="tags"><?php the_tags(__( 'tags: ', ', ', '', 'vigilance' )); ?></div>
    				<div class="author"><?php printf( __( 'by %s', 'vigilance' ), get_the_author()); ?></div>
    			</div><!--end meta-->
    			<div class="entry clear">
    				<?php if ( function_exists( 'add_theme_support' ) ) the_post_thumbnail( array(250,9999), array( 'class' => 'alignleft' ) ); ?>
    				<?php the_content(__( 'read more...', 'vigilance' )); ?>
    				<?php edit_post_link( __( 'Edit this', 'vigilance' ), '<p>', '</p>' ); ?>
    				<?php wp_link_pages(); ?>
    			</div><!--end entry-->
    			<div class="post-footer">
    				<p><?php _e( 'from &rarr;', 'vigilance' ); ?> <?php the_category( ', ' ); ?></p>
    			</div><!--end post footer-->
    		</div><!--end post-->
    	<?php endwhile; /* rewind or continue if all posts have been fetched */ ?>
    		<div class="navigation index">
    			<div class="alignleft"><?php next_posts_link( __( '&laquo; Older Entries', 'vigilance' )); ?></div>
    			<div class="alignright"><?php previous_posts_link( __( 'Newer Entries &raquo;', 'vigilance' )); ?></div>
    		</div><!--end navigation-->
    	<?php else : ?>
    	<?php endif; ?>
    </div><!--end content-->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    the code you posted must be the from index.php or so
    Please paste the code from header.php



    Awesome! That puts it in the right area too, but I wanted to replace the image with the text that says “hello” not just put it on top of it. Is that possible? When I place it in the header it kind of just shoves it in the corner (of course I can create a div class and fix the positioning), but if there is a way to put in the place of where the title text (“Hello”) already is, that would great.

    Thanks so much!

    It’s possible. Copy/Paste the code or just try until you get there 🙂



    Hey! I did it. It wasn’t the most elegant solution, but it worked.

    I’ll post what I did in case anyone else needs it:

    1) I put my image here in the “header” section

    <div id="header" class="clear">
    			<?php if (is_home()) echo( '<h1 id="title">' ); else echo( '<div id="title">' );?><strong><a href="<?php bloginfo( 'url' ); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/header3-01.png"/></a></strong><?php bloginfo( 'name' ); ?></a><?php if (is_home()) echo( '</h1>' ); else echo( '</div>' );?><a href="<?php echo get_settings('home'); ?>" title="<?php bloginfo('name'); ?>">
    <a href="<?php echo get_settings('home'); ?>" title="<?php bloginfo('name'); ?>">

    2 ) And then I found the “h1 title” class and change the font size to 0px.

    Thanks so much, danielpol. couldn’t have done it without you!

    ‘<?php bloginfo( ‘name’ ); ?>’ this outputs “Hello” which is the name of your blog

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Vigilance theme – change header’ is closed to new replies.