make sure to have a child theme of Twenty Eleven to work with – do not edit the default theme Twenty Eleven directly.
http://codex.wordpress.org/Child_Themes
if you want to add a .htm code (?) instead of the header image, and want it to be at the top of the page, you need to edit header.php in the child theme, and remove this section:
<?php
// Check to see if the header image has been removed
$header_image = get_header_image();
... ?>
...
<?php endif; // end check for removed header image ?>
then add the new code after this line:
<header id="branding" role="banner">
Thanks for that we where successful doing that yesterday but still cant get the new image to show do you have a block of code to echo the new image? The new image is an htm file
just an idea what its to look like
<header id=”branding” role=”banner”>
Then?
The new image is an htm file
What does this mean?
If you have a html file that contain’s the menu then try this!
Lets say the file is menu.html, open the file and just save it as navigation.php
To call this php file that has the html code in header.php
<?php get_template_part('navigation'); ?>
This will inject the html at run time.
HTH
David
RE: HTM files are script files that can be clicked. They are generated via fireworks and act like buttons in some cases.
I updated my post, while you were posting, save the *.html files with a *.php extention, if you had more that one use a – to group them, and use get template part.
If we had html code in files:
advert-top.php
advert-bottom.php
We call the files like this, inside the other files:
<?php get_template_part('advert','top'); ?>
HTH
David
cool can your wright it out for me so i can see what it will look like starting with
<?php get_template_part(‘advert’,’top’); ?>
and do you delete the <?php
// Check to see if the header image has been removed
$header_image = get_header_image();
… ?>
…
<?php endif; // end check for removed header image ?>
and use the <header id=”branding” role=”banner”>
?
AH ok so if i use your
<?php get_template_part(‘navigation’); ?> example just save the nav in a .php file like this public/theme/nav.php
and then call it via <?php get_template_part(‘navigation’); ?>
correct or do i store the image in images?
you will still need to remove the existing header image code; and the location for the new code is still the same.
do try and follow the suggestion by @david.
– you might need to remove all code before and including the <body>
tag from your .htm file, and all code after and including the </body>
tag as well.
– do you have the images of your .htm file already uploaded?
– where are they located?
– do the images have absolute file paths? (relative file paths might not work with WordPress)
Yes the file is located in the public/theme/images
The file was exported out of fireworks like this.
where should i store navigation.php so i can call with
<?php get_template_part(‘navigation’); ?>
Hi
Ja we update the info you requested alchymyth Thanks for your help
So i removed // Check to see if the header image has been removed
// Check to see if the header image has been removed
$header_image = get_header_image();
if ( ! empty( $header_image ) ) :
leaving the php block
then on line 95 removed <?php endif; // end check for removed header image ?>
i then inserted the <header id=”branding” role=”banner”> between the php blocks line 79 and have a error
what would be the next step and where do i insert the image and with what extension?
Well non of this seams to be working any other ideas?
we tied both and its the same the image works in any new php page we open so its not that
Solved lol bad extension i was using in the dream-weaver editor please look this over and see if there should be any issue thanks guys
[Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]