• I’m wondering how to place a new .php file in the webserver that is work for WP. By reading TheLoopInAction, I want to try it out: The World’s Simplest Index Page. Therefore, I copy the code into a .php file, eg, called “thesimpleindex.php” and place it in the root directory of my WP blog, “/htdocs/blog/”.

    However, it doesn’t work: "Fatal error: Call to undefined function: get_header() in \htdocs\blog\test-thesimpleindex.php on line 2".

    I think it is due to the relative location between “header.php” and “thesimpleindex.php” and so I try to place the index into directory “/htdocs/blog/wp-content/themes/default/” but it couldn’t help.

    Do you know where should I place files, e.g. the index above and some archive script, that call to get header.php and footer.php?

Viewing 15 replies - 16 through 30 (of 38 total)
  • That’s the standard browser 404. I’ve never seen a “wp” 404.

    Kubrick comes with a 404 that utilizes the site layout. For one thing, I think it looks better. For another, I’m getting two errors for every one encountered. It was working perfectly the last time I used WordPress as a CMS. I should have stuck with WP instead of going static, but I’ve said that at least thirteen times this week.

    Yeah, I know you have, and I know you’re really frustrated…. Stuff like this, especially when you look back and say to yourself “I REALLY screwed the pooch on this” is an absolute PITA.

    I don’t do kubrick so didn’t realize it had a “special” 404. I’ve seen other themes that have them included, but I just don’t care about stuff like that, browser 404’s are fine.

    [When it’s me getting the 404, the LAST thing I want is some site’s fancy takes-3-hours-to-load-on-my-antique-dialup grinding away…. I want to know it’s a 404 RIGHT NOW, so I can do something more useful….)

    :o) Well, you certainly hit the nail squarely on the head! I’ve decided if I figure out how to fix it, great. Otherwise, it’s not worth my time. Hey, at least it’s not the index screwing up!

    Thanks for your time,
    Jonathan

    Well, happy holidays to you Jon, I do hope you get it figured out eventually, or that someone brighter than I am can help you!

    Thank you! Happy holidays to you, as well. Just getting back to WordPress is a Christmas gift I decided to give myself, even if it takes a few sleepless nights plugging away at it!

    Hey, one last thought….

    Sometimes plugging away at something isn’t the best way to do it. Take a break. Go out and play in the snow (assuming you have any – which I *sigh* don’t!), take your kids to the ice-sculpture snow, meet your love at the carousel…. you get the idea.

    WP isn’t going anywhere, and we aren’t either. Look up at the stars and wish the world peace and happiness, and we’ll see you in a couple days, okay?

    Go out and play in the snow (assuming you have any – which I *sigh* don’t!)

    Want to move to Winterpeg? This is my street

    Ooooohhhhh – I’ll TRADE you! I’m retired, it can do that forever and I don’t have to care….

    Here it was 60 degrees F and dry….

    Getting back on topic…

    If you use custom permalinks, you can (manually) add this ErrorDocument line to your .htaccess file to force the server to pass the error to WP and use the template which comes with your theme:

    ErrorDocument 404 /index.php?error=404

    You (of course) may need to modify the path to index.php, all depending on how things are set up on your site.

    Where do you add that, then, Kafkaesqu?-?

    “to your .htaccess file”

    Ah! Thanks…. heh, that’s why I have host support – I don’t DO that stuff….

    Hehe. Got it.

    [Um. Just so we are ALL on the same page here…. I am a space cadet sometimes – my eyes simply don’t “see” stuff like “.htaccess” – thanks for being kind about that particular blindness, Kafkaesqu?-!]

    And one more “dumb question” (I left blonde out….) – that goes between the # BEGIN WordPress and # END WordPress lines, right?

Viewing 15 replies - 16 through 30 (of 38 total)
  • The topic ‘alternative index file location’ is closed to new replies.