• Resolved Scott@adszoom

    (@scottadszoom)


    Hi

    So we are trying to create a custom header without the nav bar and default photos. We have created a new nave bar in fireworks(.htm)file type and exported as such. We want it to a pier in the header.php file for all custom templates/search result ecs. as default image. We tested the .htm file on a test page without the header and it works fine. We tried to find where the image path is in the css files where in previous word press versions stored. We are having 0 luck and can not get the header to get the new image. Can someone out there please give us instruction on how to incorporate our new image into the deader please. We would like it to be at the very top of the page click able. We then will be adding images to our static homepage after the header and any input for this will be helpful.

    Thanks
    Scott

    Ps do we have to use the header.php at all?

Viewing 15 replies - 1 through 15 (of 25 total)
  • Michael

    (@alchymyth)

    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">
    Thread Starter Scott@adszoom

    (@scottadszoom)

    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

    Thread Starter Scott@adszoom

    (@scottadszoom)

    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

    Thread Starter Scott@adszoom

    (@scottadszoom)

    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

    Thread Starter Scott@adszoom

    (@scottadszoom)

    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”>

    ?

    Thread Starter Scott@adszoom

    (@scottadszoom)

    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?

    Michael

    (@alchymyth)

    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)

    Thread Starter Scott@adszoom

    (@scottadszoom)

    Yes the file is located in the public/theme/images
    The file was exported out of fireworks like this.

    Thread Starter Scott@adszoom

    (@scottadszoom)

    where should i store navigation.php so i can call with
    <?php get_template_part(‘navigation’); ?>

    Thread Starter Scott@adszoom

    (@scottadszoom)

    Hi
    Ja we update the info you requested alchymyth Thanks for your help

    Thread Starter Scott@adszoom

    (@scottadszoom)

    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?

    Thread Starter Scott@adszoom

    (@scottadszoom)

    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

    Thread Starter Scott@adszoom

    (@scottadszoom)

    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]

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘header image change for 2011 defalt theme custom header’ is closed to new replies.