WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom header for Origin theme? (7 posts)

  1. hillfrank
    Member
    Posted 11 months ago #

    I am trying to figure out how to add a custom sized header image in Origin theme. (The theme includes a custom left justified header of 235px x 70px.) The image I'm trying to place is 940px x 140px (should take up the entire width of the page). I'd like this to fall just below the primary navigation bar and above the thick black line.
    This topic was covered before here, but when I tried the code it placed my header above the navigation, not below.

    I am using a child theme.

    My site.

    Any suggestions?

  2. hillfrank
    Member
    Posted 11 months ago #

    Oh, and to be clear: I am trying to replace the header text with this image.

  3. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    Can you post your child theme header.php code? Please be sure to use the code buttons when posting code here.

  4. hillfrank
    Member
    Posted 11 months ago #

    I tinkered, based on the previous post that I linked to, and got the header image just where I want it. Now to remove the header text. Should be simple, no?

    <div id="header">
    
    				<?php do_atomic( 'open_header' ); // origin_open_header ?>
    
    					<div id="branding">
    
    					<?php origin_site_title(); ?>
    
    					</div><!-- #branding -->
    
    					<?php get_template_part( 'menu', 'primary' ); // Loads the menu-primary.php template. ?>
    
    <div id="headerimage">
    <a href="http://longestshortesttime.com"><img src="http://longestshortesttime.com/wp-content/uploads/2013/08/lst_header_origin.jpg" alt="header-logo" /></a>
    </div>
    
    					<?php hybrid_site_description(); ?>
    
    					<?php do_atomic( 'header' ); // origin_header ?>
    
    				<?php do_atomic( 'close_header' ); // origin_close_header ?>
    
    			</div><!-- #header -->
    
    			<?php do_atomic( 'after_header' ); // origin_after_header ?>
    
    			<?php do_atomic( 'before_main' ); // origin_before_main ?>
    
    			<div id="main">
    
    				<?php do_atomic( 'open_main' ); // origin_open_main ?>
  5. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    Yep, try adding this to your style.css file:

    #site-title {
            position: absolute !important;
            clip: rect(1px 1px 1px 1px); /* IE7 */
            clip: rect(1px, 1px, 1px, 1px);
    }
  6. hillfrank
    Member
    Posted 11 months ago #

    Wow, perfect! Thank you, Yogi! It is magic that I can type in my WP woes and get instantaneous fixes from people like you.

  7. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    LOL - you're welcome - and you'd already done a lot of great work yourself - which really is the ideal scenario on these forums. Nice :).

Reply

You must log in to post.

About this Topic