• Resolved roclimb

    (@roclimb)


    Hi,
    Im trying to get an alternate header from a custom template page and a custom css style from that page as well. I do not have this page linked to anything else on the localhost(my site) and only want to test the css and template page.

    This is what I did

    did page–add page and selected the custom theme template I made.

    added :

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

    <?php get_header(‘header_state’); ?>

    added above to the page. and in the header_state added this:

    <link rel=”stylesheet” type=”text/css” href=”<?php bloginfo(‘template_url’); ?>//localhost:8888/cnb_press/wp-content/themes/cnb-zip1/state_style.css” media=”screen” />
    To call a custom css.

    I am not loading the alternate header I created called header_state and am pulling my index.php header still. Anybody know why or how I can fix this?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • what is the file name of the custom header template?

    should be header-header_state.php

    http://codex.wordpress.org/Function_Reference/get_header

    also, double check the output of this line:
    href="<?php bloginfo('template_url'); ?>//localhost:8888/cnb_press/wp-content/themes/cnb-zip1/state_style.css"

    the ‘<?php bloginfo(‘template_url’); ?>’ part looks a bit redundant.

    http://codex.wordpress.org/Function_Reference/bloginfo

    Thread Starter roclimb

    (@roclimb)

    Tried changing the header_state like you said and also several variations of that but I still am not importing my header_state.php header. Any other ideas?

    Thread Starter roclimb

    (@roclimb)

    Got it!
    Thanks for the help. It was by importing the <?php bloginfo(‘template_url’) and it works like a charm. I now have a unique header and unique css. Lets me make a completely different looking page for my site just like i wanted.

    Thanks again for all the help. it makes a huge difference.
    Kudos
    Rob

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Alternate Headers’ is closed to new replies.