• I hope that I’m not being redundant… I didn’t have time to browse the forum much.

    I created a new “index.php” page within my theme folder and renamed the previous “index.php” page to “blog.php”. I did this because I do not want the blog template to be the initial page on the site. I now get an error when trying to link to the other php files in the theme. I’m assuming that I need to make a change within the “header.php” template file (or some other file?), but I’m not sure what to change. Can anyone clue me in ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • You do really need to consult the great sages at Codex for this.

    If you go to the following url
    https://your-wordpress-site-url/wp-admin/options.php

    You will get blogfilename option which is set to index.php. I suppose you set another file for it.

    However, I’m not sure exactly, but I believe index.php is hard-coded in various places, for example, in wp-blog-header

    } else if ( file_exists(TEMPLATEPATH . "/index.php") ) {
    include(TEMPLATEPATH . "/index.php");
    exit;
    }

    So your blogfilename setting change may break (I haven’t verify it) the site unless you modify the source code to take account for different blogfilename

    Here’s what I did. Very similar to what your trying. I renamed the wordpress index.php file to index.phpbak. I than renamed my index.html file to index.php. Copied and pasted the index.phpbak info into my body div section of my index.php file.

    <div class=”bodytext”>
    <?php
    /* Short and sweet */
    define(‘WP_USE_THEMES’, true);
    require(‘./wp-blog-header.php’);
    ?>
    </div>

    https://www.pcgurumike.com/

    So far it’s been working great. The only thing I’m trying to do now is reposition the Header which was the sidebar info. I really don’t like having it right under my web page banner. Either by making a horizontal links section or moving it under the email image on the right. Hope this might get you going in the right direction.

    Shuuh, forgot one other thing.

    If you have a file home.php in your theme directory, it will be loaded instead of index.php when you’re in frontpage view. To change home.php to something else, you have to create a plugin or go down to modifying the source code of file functions.php under function get_home_template() and change the reference to home.php to something else.

    This is why you need to read Codex.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Structural question…’ is closed to new replies.