WordPress.org

Ready to get started?Download WordPress

Forums

Static Front Page (17 posts)

  1. Gustaf
    Member
    Posted 8 years ago #

    Iv had my wordpress blog for about 10 months or so, but now lately i have been looking into the option of having a static front page in the same look of the rest of the blog. I just want to have a presentation page that doesnt change, which also search engines will recognize so it doesnt get a new content all the time. Is this possible to do in some way? How would i go about? Any advice welcome.

  2. schestowitz
    Member
    Posted 8 years ago #

    Have a look here:

    http://wordpress.org/support/topic/53059

    Very recent thread, in fact.

  3. moshu
    Member
    Posted 8 years ago #

    The simplest way is to make a home.php template in your theme - that would take precedence over your index.php template when showing the main page of the blog (see Template_Hierarchy). You can edit it as you want: static or dynamic, or a combination of both. When I needed such a solutioon I saved the index as home and did a necessary editing.

  4. Gustaf
    Member
    Posted 8 years ago #

    I have now created this static frontpage according to the wordpress codex. Using .htaccess to make home.php my main page, and index.php to my blog page. This works great, as long as i dont try to login into wp.

    When i click login, enter name n password and hit enter i get "You don't have permission to access /wp-admin/ on this server."

    This only happens when the .htaccess page makes home.php the main page. I changed it back, and it works just fine, but i want to keep my static page, how would i go about to make the login work when index.php is not my main page?

    Thanks. G

  5. tikimaticdotcom
    Member
    Posted 8 years ago #

  6. moshu
    Member
    Posted 8 years ago #

    Gustaf,
    you are over-complicating it. I didn't mention anything about .htaccess. Just drop your home.php in the theme folder and you are done.

  7. Gustaf
    Member
    Posted 8 years ago #

    I know, but i started reading here. http://codex.wordpress.org/Creating_a_Static_Front_Page

    Change Apache Configuration File

    There is another form to upload your static front page without moving all your WordPress files to another folder.

    When you request a folder in a Apache web server (http://www.apache.org) (for example the folder called /chouette), the core of Apache will search for a file with any of the names in a list saved in httpd.conf. If your server lets you use .htaccess files for change the original configuration, you can follow these steps:

    1. Open the .htaccess file from your root web folder in a text editor.
    2. At the top of the file, add:

    DirectoryIndex home.php

    Save and upload the modified .htaccess fil

    Using this method iv managed to get everyhting to work, except the login part. When i did drop home.php in my theme dir, i cant get to the blog part, which is located on index.php and i cant access any Pages links like /about/ or /archives/

    Feel free to have a look at my page which is located at http://www.aloud.se (Currently using the .htaccess bit)

  8. moshu
    Member
    Posted 8 years ago #

    The home.php in the theme works for me - but of course, I don't mess around with the .htaccess file! Meaning: the home.php in the theme folder does NOT need any modifications in the .htaccess.

    Also, I don't know anything about Apache servers and I don't have access to my host's setting, so I just disregard this kind of "geek" articles in the Codex. My principle is: if I can do it in a simple way, why should I bother with some complicated solutions?

  9. Gustaf
    Member
    Posted 8 years ago #

    (masquerade) Gus, copy your wp-admin/index.php to wp-admin/home.php
    (Gus) Make another copy and name it home.php
    (Gus) k
    (Gus) Lovely! :)
    (Gus) Sometimes the simplest solution are just so great.
    (davidhouse) thanks, masquerade. i should have spotted that.

  10. davidhouse
    Member
    Posted 8 years ago #

    Fixed after a conversation in #wordpress - resolution was to COPY wp-admin/index.php to wp-admin/home.php (make sure that wp-admin/index.php is still there afterward :))

  11. davidhouse
    Member
    Posted 8 years ago #

    Okay, so Gustaf got there first :)

  12. danadane66
    Member
    Posted 7 years ago #


  13. danadane66
    Member
    Posted 7 years ago #

    I followed the directions stated in this thread to create a static front page using the home.php page. It worked great, however, I now want to link from the static front page to the index.php, where all of the blog postings will be.

    I created the link http://www.domain.com/index.php - but the page just redirects to the home.php page on its own.

    Can anyone assist me with this?

  14. moshu
    Member
    Posted 7 years ago #

    Don't double post, please! (usually, it gets deleted)

    If you have home.php - you cannot display index.php.

  15. danadane66
    Member
    Posted 7 years ago #

    How can my individual blog posts be displayed then - as it would if I were not using home.php?

  16. moshu
    Member
    Posted 7 years ago #

    By category, by month, one by one (aka single post).

  17. danadane66
    Member
    Posted 7 years ago #

    I created a page.php page and pasted in the contents from the index.php file. It seemed to work, in part, in that the blog postings are listed there as they normally would be without the static page.

    The problem comes in when I click on the "pages" I created. I get the following error message:

    Parse error: parse error, unexpected '>' in /home/atlantah/public_html/wp-content/themes/devenir_en_gris/page.php on line 7

    Any ideas of what I can do to fix this?

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags