Viewing 11 replies - 1 through 11 (of 11 total)
  • Define *pages*

    Thread Starter woolhat

    (@woolhat)

    Pages: meaning not posts. like when you create a page in wordpress, generally it is a seperate static page from the posts…

    The short answer is yes. The easy but home blogger kind of way is to set up a template for each page. The other way is to use a conditional php call to add the right CSS (the new banner).

    Thread Starter woolhat

    (@woolhat)

    ok, so how would i go about doing this? Both ways if you can…

    Create a new template by copying say your index file and renaming it.Then add this at the start:

    <?php
    /*
    Template Name: Giveitaname
    */
    ?>

    Upload to server. Now when you create a page in the drop down option box your new template should be visible. Edit the template to taste. In this case just put in an import to a stylesheet defining the right banner. Or hardcode it straight into the template. Then either repeat or start learning php ??

    Thread Starter woolhat

    (@woolhat)

    cool, this helps. i really have no idea how php works in general, and i thank you for your help. i may have a few more questions, like what index file, and upload it to where on the server?

    Well you need a file to copy. I suggest index.php. Dont damage yours. Just copy it / rename it add the fancy bit above. Then it needs to go in your theme directory. I am presuming you have one ?

    Thread Starter woolhat

    (@woolhat)

    yeah, i got a them directory. i should use the index.php in the theme that i am using or the one outside the theme?

    The theme one will do. But remember you are just copying it before you start hacking about ??

    Thread Starter woolhat

    (@woolhat)

    Thanks. i’ll give it a shot and if i have more questions, i’ll know where to ask them

    I have a related problem, and I think I can handle a PHP solution.
    I’m using Crisp & Clean by fernando. I edited the images, and as a result the header image looks ugly if it’s shown on pages (because pages have no sidebar). Basically, I want to have two header images, one for the frontpage and one for any page that doesn’t show the sidebar.
    Looking at the template, it seems that the easiest thing is to put an “if clause” (is that what you call it?) in the one place that the header image is defined. Here’s the code at that place:
    #header { background: url(<?php bloginfo('stylesheet_directory'); ?>/images/kubrickheader.jpg) no-repeat bottom center; }
    How can I put in an “if clause” so that if we’re not viewing the frontpage, kubrickheader2.jpg is displayed?

    THANKS in advance for the help. I really appreciate you taking your time.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Different Header or banner images for different pages’ is closed to new replies.