Wordpress Help: WP is not using my custom page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • The Dawg
    Confirmed User
    • Apr 2002
    • 2438

    #1

    Wordpress Help: WP is not using my custom page

    I have set the index as static (home.php)

    So I want the blog pages to be shown under /blog

    The index (home.php) loads up fine, header and custom setup.

    The blog posts load, BUT:

    The blog page is not updating. It is loading the old header, SO the css changes are not being loaded.

    I read something about the hierarchy, but I have no idea what to change.

  • harvey
    Confirmed User
    • Jul 2001
    • 9266

    #2
    I'm not 100% sure what do you mean, anyway, if you're using 2 headers (is that what you mean?) then you need to require the correct header, like this:

    Code:
    <?php include(TEMPLATEPATH.'/header2.php'); ?>
    however, to avoid mistakes, juts use conditionals. Replace EVERYTHING you have in header.php with something like this:

    Code:
    <?php
    if (is_front_page()){
    	<?php include(TEMPLATEPATH.'/mainheader.php'); ?>
    }
    elseif (is_single()){
    	<?php include(TEMPLATEPATH.'/header-single.php'); ?>
    }
    else {
    	<?php include(TEMPLATEPATH.'/header1.php'); ?>
    }
    ?>
    this code will allow you to use 1 header for your main static page, a different one for single pages (if you need it) and everything else (such as pages) will use a default header. Play with it as you wish
    This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth

    Comment

    • The Dawg
      Confirmed User
      • Apr 2002
      • 2438

      #3
      Thanks.

      I'll use this.

      The other problem was that I moved the blog from a sub-dir to the root and the single was looking at the old folder.

      Comment

      • The Dawg
        Confirmed User
        • Apr 2002
        • 2438

        #4
        Second note for anyone else who has this issue:

        Seems home.php may be a reserved filename.

        Comment

        • iwantchixx
          Too lazy to set a custom title
          • Oct 2002
          • 12860

          #5
          Silly question but did you clear your browser cache? I find that mozilla based browsers tend to keep using a cached version of css and caused me headaches similar to yours.

          Comment

          • QuantumDesigns
            Confirmed User
            • Feb 2012
            • 49

            #6
            Yeah, first clear your cache and make sure you're not just searching for a problem that's not there.

            Second, make sure all of your stylesheets and other included files have the correct paths in your code (as harvey mentioned).
            Services: Web Design, Custom Development, PHP, MySQL, WordPress plugins, JavaScript, System Adminstration and more!

            Content: Producing and selling Original Asian content. Contact me to buy.

            ICQ: 706149662
            SKYPE: valerianxx

            Comment

            • The Dawg
              Confirmed User
              • Apr 2002
              • 2438

              #7
              Yea, the cache thing was the first thing I did.

              Everything is working correctly now.

              Comment

              • fris
                Too lazy to set a custom title
                • Aug 2002
                • 55679

                #8
                Originally posted by harvey
                I'm not 100% sure what do you mean, anyway, if you're using 2 headers (is that what you mean?) then you need to require the correct header, like this:

                Code:
                <?php include(TEMPLATEPATH.'/header2.php'); ?>
                however, to avoid mistakes, juts use conditionals. Replace EVERYTHING you have in header.php with something like this:

                Code:
                <?php
                if (is_front_page()){
                	<?php include(TEMPLATEPATH.'/mainheader.php'); ?>
                }
                elseif (is_single()){
                	<?php include(TEMPLATEPATH.'/header-single.php'); ?>
                }
                else {
                	<?php include(TEMPLATEPATH.'/header1.php'); ?>
                }
                ?>
                this code will allow you to use 1 header for your main static page, a different one for single pages (if you need it) and everything else (such as pages) will use a default header. Play with it as you wish
                i would just use get_header() for multiple headers.

                single.php instead of get_header() use get_header('single');

                header-single.php it will look for.
                Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                Comment

                Working...