Jump to content
Sign in to follow this  
cfimortgage

Add Header Content - Not CSS

Recommended Posts

cfimortgage

How can I add additional html code to the head (not the <head>)of the body. I would like to be able to add some objects outside of the normal design but I cant figure out where to put the code for this theme. Normally I would just edit the theme directly but that doesnt seem so wise with this theme. ^_^ An example of what I would like to do it the logo on http://wagstorichesflorida.com/ It is not a part of the main theme. Or even the 3 objects at the lower right hand corner. They are loaded in the the head of the body so they load on every page but I have looked all over the settings and cant seem to find a way to add anything but css or info to the header and footer. Thank you ahead of time for any help you can give.

Share this post


Link to post
Share on other sites
cfimortgage

Actually I figured it out. It looks like a scary new adventure learning how to edit the base theme. lol

Share this post


Link to post
Share on other sites
cfimortgage

Ok so I was able to get the base them to work and I was able to put some code into the functions.php and it worked which is great but is there a hook for something above the main header area? I actually want my logo above all the white of the main content area. Like it is on the website I said above. Please and thank you for any help you can give.

Share this post


Link to post
Share on other sites
Guest Guest

You basically have to make a custom header.php file and put it into base. Here is an example of something similar we did for the following client: http://duitrialdefense.com Take a look at our header.php as a reference for how to accomplish this yourself.

<?php
	/*
	
		HEADER
	
		This file controls the HTML <head> and top graphical markup (including Navigation) for each page in your theme.
		You can control what shows up where using WordPress and PageLines PHP conditionals
	
		This theme copyright (C) 2008-2010 PageLines
	
	*/
		do_action('pagelines_before_html'); //hook
	?><!DOCTYPE html><!-- HTML 5 -->
	<html <?php language_attributes(); ?>>
	<head>
	<?php
			do_action('pagelines_code_before_head'); //hook
	
			pagelines_head_common(); // Common header information
	
			do_action('pagelines_head'); //hook
	
			print_pagelines_option('headerscripts'); // Header Scripts Input Option
	
			pagelines_font_replacement('calluna.font.js'); // Cufon Font Replacement
	
			pagelines_fix_ie('.pngbg, .shadow-bottom, .post-comments a, #fcolumns_container, #footer img, .branding_wrap img, .fboxgraphic img '); // Fix IE Issues. Args = .png images to fix in ie6
	
			wp_head(); // Hook (WordPress)
	
		global $global_pagelines_settings;
	
		$design_mode = (pagelines_option('site_design_mode')) ? pagelines_option('site_design_mode') : 'full_width';
	
		$body_classes = '';
		$body_classes .= $design_mode;
		if(pagelines_is_buddypress_active() && !pagelines_bbpress_forum()){
			$body_classes .= ' buddypress';
		}
	
		global $pagelines_template;
		$body_classes .= ' ttype-'.$pagelines_template->template_type.' tmain-'.$pagelines_template->main_type;
	
	?></head>
	<body <?php body_class( $body_classes ); ?>>
	
	<div class="headerbg">
		<div class="customheader">
			<div style="float:left;">
				<?php if(pagelines_option('pagelines_custom_logo')):?>
					" title="<?php bloginfo('name');?> <?php _e('Home', 'pagelines');?>">
				<?php pagelines_register_hook( 'pagelines_before_header_image', 'branding' );?>
					" alt="<?php bloginfo('name');?>" />
					
				<?php else:?>
					<h1 class="site-title">
						/" title="<?php _e('Home','pagelines');?>">
							<?php bloginfo('name');?>
						
					</h1>
					<h6 class="site-description"><?php bloginfo('description');?></h6>
				<?php endif;?>
			</div>
			<div style="float:right;_margin-top: -68px;">
				<div class="caseeval">Call for a FREE Case Evaluation</div>
				<?php if(eregi("MSIE",getenv("HTTP_USER_AGENT")) ||
	       eregi("Internet Explorer",getenv("HTTP_USER_AGENT"))):?>
					
				<?php else:?>
					<div class="phone">(949) 825-5200</div>
				<?php endif;?>
			</div>
		</div>
	</div>
	
		<?php print_pagelines_option('asynch_analytics');  // Recommended Spot For Asynchronous Google Analytics ?>
	
		<?php do_action('pagelines_before_site'); //hook ?>
		<div id="site" class="<?php echo pagelines_layout_mode();?>"> <!-- #site // Wraps #header, #page-main, #footer - closed in footer -->
	
			<?php do_action('pagelines_before_page'); //hook ?>
			<div id="page"> <!-- #page // Wraps #header, #page-main - closed in footer -->
				<div id="page-canvas">
					<?php do_action('pagelines_before_header');?>
					<div id="header" class="container-group fix">
						<div class="outline">
							<?php do_action('pagelines_header', 'header'); //hook ?>
						</div>
					</div>
					<?php do_action('pagelines_before_main'); //hook ?>
					<div id="page-main" class="container-group fix"> <!-- #page-main // closed in footer -->
						<div id="dynamic-content" class="outline fix">
							<?php if(pagelines_is_buddypress_page()):?>
								<div id="buddypress-page" class="fix">
									<div class="content fix">
							<?php endif;?>[/code]

Share this post


Link to post
Share on other sites
cfimortgage

How do I tell the theme to use my header.php vs the one that comes with pro?

Share this post


Link to post
Share on other sites
kastelic

Or you could try pagelines_before_branding. If you go to template setup and the "header", click on "advanced controls" and you'll see a list of hooks for the header. Just another suggestion, of course both ways will work :)

Share this post


Link to post
Share on other sites
cfimortgage

My issue with your suggestion is that I have used the pagelines_before_branding and it packs the logo into the div that controls that header section. Which drops the logo right over the nav an other logo.

Share this post


Link to post
Share on other sites
cfimortgage

Just incase anyone else would like the coding I used to get this to work. add_action('pagelines_before_branding', 'add_logo'); function add_logo() { ?> (Add <)img alt="" src="/wp-includes/images/Logo.png" style="z-index:auto; position:absolute; left: 50%; right: 0; top: -200px; margin-left:-279px;"(Add >) <?php } The left margin in half of the image width and the to is how much higher from the header div I wanted the image to sit.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×