Forums

[resolved] add a new index.html to root (19 posts)

  1. szabizs
    Member
    Posted 2 years ago #

    Hey guys,

    I build my own portfolio page.

    I got my WP running for a year now and I want to make something new, but can't find the way to do it.

    I want to make a FLASH portfolio and to keep my WP.

    I want that my index.html to be a splash screen with 2 option, go to blog or go to portfolio, but I can't do this without moving my WP to another folder, I want to keep WP in the root, is that possible ?

    Thank you,
    Szabi Zs.
    http://www.bysobi.com

  2. Make a Static Front Page for your site. In the template for the page, put the flash. Then make a second page (like 'news' or 'blog') and have THAT page template be your normal index page :)

  3. szabizs
    Member
    Posted 2 years ago #

    The problem is that the static page will be loaded inside WP and my widgets and menus will be visible, I don't want that.

  4. James
    Happiness Engineer
    Posted 2 years ago #

    The problem with that is that WordPress will always direct visitors to bysobi.com (with no specific index). If you place an index.html file in root, you'll effectively "break" your blog, because the visiting browsers will then load bysobi.com/index.html as it comes before bysobi.com/index.php alphabetically.

    Now, you could set your .htaccess file to override the alphabetical order and load bysobi.com/index.php first, but that would defeat the purpose of have a splash screen, as no one would ever see it unless they specifically went to bysobi.com/index.html .

    The best solution in this case would be to move your blog to a subdirectory, like bysobi.com/blog/ . That way, you can keep your splash page in the root without affecting your blog.

  5. szabizs
    Member
    Posted 2 years ago #

    That is true, BUT :)

    If I move to a subdirectory, I will loose all my links from the search engines and posts on social platforms, that's my main concern with the subdirectory.

  6. James
    Happiness Engineer
    Posted 2 years ago #

    That is certainly one unfortunate side-effect.

    A good compromise would be to go with Ipstenu's suggestion of assigning a static front page, and create a custom page template with no sidebar or menu, basically just the page and whatever you put in it.

  7. I was going to say what macmanx said :) You don't HAVE to have any widgets etc in your static front page. I do exactly that one mine :)

  8. szabizs
    Member
    Posted 2 years ago #

    Thank you,

    How can I assign my template just for the static page?

    I dont have the option to set the template in the right sidebar.

  9. James
    Happiness Engineer
    Posted 2 years ago #

    It should be there. When you go to Pages/Add New in the admin panel, you should see "Attributes" off to the right. Expand it, if it isn't already, and select the template from the pull-down menu under the "Template" section.

  10. szabizs
    Member
    Posted 2 years ago #

    Nope, it's not there.

    Parent
    
    Page Parent
    You can arrange your pages in hierarchies. For example, you could have an “About” page that has “Life Story” and “My Dog” pages under it. There are no limits to how deeply nested you can make pages.
    
    Order
    
    Page Order
    
    Pages are usually ordered alphabetically, but you can put a number above to change the order pages appear in.
  11. James
    Happiness Engineer
    Posted 2 years ago #

    Have you created the page template yet? The menu will not appear if you don't have any page templates.

  12. Mark / t31os
    Moderator
    Posted 2 years ago #

    Have you created the page template yet? The menu will not appear if you don't have any page templates.

    It should still appear, it will just show one option "Default".

  13. James
    Happiness Engineer
    Posted 2 years ago #

    It should still appear, it will just show one option "Default".

    It won't appear if he's using a theme that has no defined page templates, like the Classic theme for example.

  14. Mark / t31os
    Moderator
    Posted 2 years ago #

    Oh yes, you're correct, i had always assumed it was shown when no templates were present, being the default option.. (i was wrong)... :)

  15. szabizs
    Member
    Posted 2 years ago #

    Well I've created a folder SPLASH with the slash.php and page.php in the themes folder.

    Isn't that the location that I should create it?

  16. James
    Happiness Engineer
    Posted 2 years ago #

    No, you create it as a template with your theme. Follow the guide linked to above and create a page template titled Splash in a file named splash.php, then upload that your current theme's directory.

  17. szabizs
    Member
    Posted 2 years ago #

    Yesssss, I copied it and it works, thank you guys for the help :)

  18. James
    Happiness Engineer
    Posted 2 years ago #

    You're welcome!

  19. yunsikshin
    Member
    Posted 1 year ago #

    I've tried the above instructions but when I go check out my site, my content does not show and it just shows a blank page.
    How do I fix that?

Topic Closed

This topic has been closed to new replies.

About this Topic