Custom Header
#1
Posted 20 May 2011 - 03:37 AM
#2
Posted 20 May 2011 - 04:03 AM
#3
Posted 20 May 2011 - 04:04 AM
#4
Posted 20 May 2011 - 04:05 AM
#5
Posted 20 May 2011 - 04:06 AM
#6
Posted 20 May 2011 - 04:11 AM
#7
Posted 20 May 2011 - 05:52 AM
#8
Posted 20 May 2011 - 03:54 PM
#9
Posted 21 May 2011 - 01:30 AM
Here's the test site I'm building it on:
http://www.bradlowen...nment.com/blog/
Here's the code, too, I think I'm doing it right:
<?php
// Setup -- Probably want to keep this stuff...
// Set up action for section registration...
add_action('pagelines_register_sections', 'base_sections');
/**
* Hello and welcome to Base! First, lets load the PageLines core so we have access to the functions
*/
require_once('setup.php');
// For advanced customization tips & code see advanced file.
//--> require_once(STYLESHEETPATH . "/advanced.php");
// ====================================================
// = YOUR FUNCTIONS - Where you should add your code =
// ====================================================
// ADDING CUSTOM SECTIONS ------- //
// Register a Drag&Drop HTML Section for the admin.
// A pullquote section was created here for demonstration purposes
// Sections should be named: section.[your section name].php and placed in the sections folder.
function base_sections(){
/*
Your custom sections get registered in here...
PageLines Register Section Arguments:
1. Section Class Name,
2. Directory name (or filename if in root of 'sections' folder),
3. Init Filename (if different from directory name),
4. Section setup and variable array
*/
pagelines_register_section('BasePullQuote', 'pullquote', null, array('child' => true) );
pagelines_register_section('BaseSidebar','sb_base', null, array('child' => true) );
}
add_action('pagelines_inside_top_branding', 'brads_header');
function brads_header() {
//your header
//
// <SCRIPT LANGUAGE="JavaScript">
loadImage1 = new Image();
loadImage1.src = "images/Dumbo_Hover.jpg";
staticImage1 = new Image();
staticImage1.src = "images/Dumbo.jpg";
loadImage2 = new Image();
loadImage2.src = "images/Can_Hover.png";
staticImage2 = new Image();
staticImage2.src = "images/Can.png";
loadImage3 = new Image();
loadImage3.src = "images/Charles_Hover.png";
staticImage3 = new Image();
staticImage3.src = "images/Charles.png";
loadImage4 = new Image();
loadImage4.src = "images/Law_Hover.png";
staticImage4 = new Image();
staticImage4.src = "images/Law.png";
loadImage5 = new Image();
loadImage5.src = "images/Jet_Hover.png";
staticImage5 = new Image();
staticImage5.src = "images/Jet.png";
loadImage6 = new Image();
loadImage6.src = "images/Chad_Hover.png";
staticImage6 = new Image();
staticImage6.src = "images/Chad.png";
loadImage7 = new Image();
loadImage7.src = "images/Danny_Hover.png";
staticImage7 = new Image();
staticImage7.src = "images/Danny.png";
</script>
</head>
<body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- Save for Web Slices (poreo tron v3 layout hover.psd) -->
<table id="Table_01" width="1215" height="619" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="4">
</td><td colspan="3" rowspan="5">
</td><td colspan="2" rowspan="4">
</td><td colspan="3" rowspan="4">
</td><td colspan="3" rowspan="4">
</td><td colspan="3" rowspan="3">
</td><td colspan="2" rowspan="2">
</td><td>
</td></tr>
<tr>
<td colspan="4" rowspan="5">
</td><td>
</td></tr>
<tr>
<td colspan="2" rowspan="5">
</td><td>
</td></tr>
<tr>
<td colspan="3" rowspan="5">
</td><td>
</td></tr>
<tr>
<td colspan="8" rowspan="4">
</td><td>
</td></tr>
<tr>
<td colspan="3" rowspan="3">
</td><td>
</td></tr>
<tr>
<td colspan="4" rowspan="2">
</td><td>
</td></tr>
<tr>
<td colspan="2">
</td><td>
</td></tr>
<tr>
<td rowspan="2">
</td><td>
</td><td rowspan="2">
</td><td colspan="2">
</td><td rowspan="2">
</td><td colspan="2">
</td><td colspan="2">
</td><td rowspan="2">
</td><td colspan="2">
</td><td rowspan="2">
</td><td colspan="2">
</td><td rowspan="2">
</td><td colspan="2">
</td><td rowspan="2">
</td><td>
</td></tr>
<tr>
<td>
</td><td colspan="2">
</td><td colspan="4">
</td><td colspan="2">
</td><td colspan="2">
</td><td colspan="2">
</td><td>
</td></tr>
<tr>
<td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td>
</td><td></td>
</tr>
</table>
}
// ABOUT HOOKS --------//
// Hooks are a way to easily add custom functions and content to the Platform theme. There are hooks placed strategically throughout the theme
// so that you insert code and content with ease.
// HOOKS EXAMPLE --------//
// Below is an example of how you would add a social media icon to the icons in header (branding section)
// We have placed a hook at the end of the icon set specifically add new icons without modifying code or having to worry about your edits
// getting thrown out during the upgrade process. The way to use hooks goes a little like this:
// add_action('hook_name','function name');
// ---> uncomment to load
//add_action('pagelines_branding_icons_end', 'add_icons_to_branding');
// function name
function add_icons_to_branding(){
// This hook adds a stumbleupon icon to the header of your theme. The class referenced in the link can be seen in the style.css
// and is the image from the CSS is placed in the images folder
?>
<?php }
// end function
// ABOUT FILTERS ----------//
// Filters allow data modification on-the-fly. Which means you can change something after it was read and compiled from the database,
// but before it is shown to your visitor. Or, you can modify something a visitor sent to your database, before it is actually written there.
// FILTERS EXAMPLE ---------//
// The following filter will add the font Ubuntu into the font array $thefoundry.
// This makes the font available to the framework and the user via the admin panel.
add_filter ( 'pagelines_foundry', 'my_google_font' );
function my_google_font( $thefoundry ) {
$myfont = array( 'Ubuntu' => array(
'name' => 'Ubuntu',
'family' => '"Ubuntu", arial, serif',
'web_safe' => true,
'google' => true,
'monospace' => false
)
);
return array_merge( $thefoundry, $myfont );
}
// ADDING NEW TEMPLATES --------//
// Want another page template for drag and drop? Easy
// 1. Add File called page.[page-id].php to Base
// 2. Add /* Template Name: Your Page Name */ and Call to 'setup_pagelines_template();' to that file (see page.base.php)
// 3. Add 'pagelines_add_page('[page-id]', '[Page Name]');' to this functions.php file
// Add Base Page
if ( function_exists( 'pagelines_add_page' ) ) pagelines_add_page('base', 'Custom Page');
// OVERRIDE SECTION TEMPLATES --------//
// Want more customization control over any of the core section templates in PlatformPro? Just override the template file.
// To do that, just add a file called template.[section-id].php to this child theme and it will override the section templates
// for the section with that ID. For example, template.boxes.php will override the boxes templates.
// Once overridden you can copy the code from that section, paste it there and edit to your heart's content.
#10
Posted 21 May 2011 - 02:11 AM
#11
Posted 21 May 2011 - 03:24 AM
#12
Posted 21 May 2011 - 03:59 PM
<td></td>'s in the code from what I see posted above, so you may want to remove the ones with no images inside them.
#13
Posted 22 May 2011 - 02:58 AM
#14
Posted 22 May 2011 - 03:33 PM
#16
Posted 22 May 2011 - 08:42 PM
#17
Posted 22 May 2011 - 10:52 PM
#18
Posted 22 May 2011 - 11:03 PM
#19
Posted 23 May 2011 - 12:44 AM
#20
Posted 23 May 2011 - 10:10 AM
Because of the black space, you mean? I believe that's an extra image, no? Here it is in the code:
`
`BTW: You should use the "alt" attribute on your images. And, you should have a closing tag for the image (either by using
</img>or
/>at the end instead of just the closing bracket.











