WordPress.org

Ready to get started?Download WordPress

Forums

Would like a splash type home page (27 posts)

  1. rlsdesigns1
    Member
    Posted 3 years ago #

    Wondering if a home page (index.php) has to be in the default layout. Can a home page be a sideshow or splash type page that leads into the WP site/pages/blog?

    Something like:

    http://www.lisamullerstudio.com/index.html

    or

    http://www.lynnerollsstudio.com/index.html

    I found an article 'Creating a Static Front Page' (http://codex.wordpress.org/Creating_a_Static_Front_Page) but it states :

    ...Using the default configuration for a "static front page" in WordPress does not remove the sidebar or change the look of the entire site, just the content area.

    I want to remove the sidebar, etc...

    Thanks!

  2. Your homepage can have a completely different layout and/or look-and-feel than other pages - not to worry.

  3. rlsdesigns1
    Member
    Posted 3 years ago #

    That's great! Any articles/tutorials etc. to show me how?

    Thanks!

  4. I usually create a theme file called splash.php - at the top within a PHP block, add the code that tells WordPress this is a new page template:

    /*
     * Template Name: Splash
     *
     * Splash page template
     *
     * @package WordPress
     * @subpackage your-theme-folder-name
     */

    Doing this will cause this template to show up in the drop-down menu for each page. Just select it for the page you've created as your splash/home page and voila - you're done. Of course, be sure you've selected this page as your static homepage in Settings as in the Codex article you linked to above.

    Let me know if you have any questions.

  5. rlsdesigns1
    Member
    Posted 3 years ago #

    I am very much a newbie to WP, as well as to PHP.....so when you say,

    at the top within a PHP block

    sadly, don't know what a PHP block is.....:(

    my reason for learning WP: I'm a web designer. 99.9% of my client web sites have been developed using html pages, but need to have a CMS option. Thinking this can be accomplished with WP? your thoughts/input on that? if you'd like...

    thank you so much again for your expertise!!

  6. A PHP block just means something between opening and closing PHP tags. Example:

    <?php
    /*
     * Template Name: Splash
     *
     * Splash page template
     *
     * @package WordPress
     * @subpackage your-theme-folder-name
     */
    ?>

    I suggest you just jump in and start playing with a test installation - that's the best way to learn WP. I too am a web designer who once did not know PHP - but I learned some, and I find a little PHP goes a long way with WordPress.

    WP is a great CMS for clients who need a blog or news section. Don't be afraid - just start playing with it and reading, and see if you get the hang of it.

    I also recommend an excellent e-book called Digging Into WordPress as a fantastic resource.

    Good luck - it's an adventure, but a fun one!

  7. New Nine Media
    Member
    Posted 3 years ago #

    You'll need to learn at least some basic PHP to run WordPress for clients. As far as a splash page, you can do as zoonini suggests with the Template or simply create front-page.php or home.php (either one) which will be served up as the home page of the site. Then, you can create your splash page. You can even do it entirely in html and css, but you'll probably want to learn some PHP so the client has some functionality.

    WordPress has a slightly different file structure than you're probably used to. index.php isn't the "home" page, but the default page that is called if no other specific template page is created. If you create front-page.php and someone visits the site's home page, WordPress will first look for front-page.php. If that doesn't exist, it will fall back to index.php.

    See the WordPress Template Heirarchy: http://codex.wordpress.org/Template_Hierarchy

    (Why learn PHP for this? Even if your splash page is just an image and a menu, your client may need to add or remove items on the menu which means you'll want to know the PHP code to call the WordPress menu so it's universal across the site.)

  8. rlsdesigns1
    Member
    Posted 3 years ago #

    thanks z!
    I do have a test site and tried replacing the home with a static, but keep coming up short....

    will carry on with the playing. Totally digging learning WP!

    again - thanks!

    -b

  9. Awesome. Instead of creating a custom template for your splash page, you can use another method instead. Create a theme file called home.php and set it up how you want the splash page to be displayed, i.e. with your header, footer and whatever you want in between. After you upload it, this theme file should automatically be applied to your splash page as long as you have selected your static homepage correctly in Settings.

    BTW, this page in the Codex about template hierarchy is invaluable - if you enlarge the flow chart it shows you how all the theme files are used by WordPress:

    http://codex.wordpress.org/Template_Hierarchy

  10. rlsdesigns1
    Member
    Posted 3 years ago #

    I'll tell you, this is like a foreign language....been trying to replace the homepage for hours (it feels) with no success.

    - Created a home.php page
    - uploaded to the theme folder
    - In settings->reading the page does not show up in the drop down...

    Farting around here

    It does seem simple enough but am obviously missing something...

    :/

  11. Hi there - yes, I think you are missing a step.

    You need to create a new page in the WP Pages area that will be where you put the editable content of your homepage.

    Name the page "splash" - i.e. in the permalink setting, put the "slug" - that's the part of the URL after your domain name - as "splash" (without the quotes). Give it the title Splash too.

    Now save it.

    Now in your Settings, under: Front page displays - click the "a static page" radio button. Now see if your Splash page shows up on the checklist. Select it and press Save Changes.

    Let me know!

  12. rlsdesigns1
    Member
    Posted 3 years ago #

  13. It looks like you got it working, no?

    You need to edit the file that will be your splash page to get it looking how you want it - whether you used home.php or a custom template. How it looks is entirely up to you. You can also turn off commenting in your overall settings to remove the comment box everywhere.

  14. rlsdesigns1
    Member
    Posted 3 years ago #

    no - i desire something like this:

    http://johndorish.com/index.html

    I even uploaded a separate page (that i created in dreamweaver) called home.php that has one clickable image...

    nada.

    I must be brain dead...i also disabled all commenting in both discussion and in posts and it still shows up...i think i am starting to be a pain, no?
    :(

  15. Hey there. I would revert to the first method I gave you, as I don't think home.php works with static pages. I should not have confused things by mentioning that option, sorry. From the Codex:

    If a visitor goes to your home page at http://example.com/wp/, WordPress first determines whether it has a static front page. If a static front page has been set, then WordPress loads that page according to the page template hierarchy. If a static front page has not been set, then WordPress looks for a template file called home.php and uses it to generate the requested page

    Go back to my first set of instructions. Create a file called splash.php. Put the contents of your Dreamweaver-created file into it. At the very top of that file, before any other code, add this:

    <?php
    /*
     * Template Name: Splash
     */
    ?>

    Be sure there are no blank lines above this piece of code.

    Now go into Settings and select Splash as your static homepage. On the page you created within WP pages, choose Splash from the templates drop-down menu in the right column. Save. View. Let me know. :-)

  16. rlsdesigns1
    Member
    Posted 3 years ago #

    http://polaroidarts.com/CLASSblog/

    i am determined to get this.....but still no cigar, though getting closer?!

    i really think i am doing everything correctly....

  17. Your image path is broken:

    http://polaroidarts.com/CLASSblog/images/header.jpg

    If you put the graphic in your theme's images folder, you should reference it this way in your code:

    <img src="<?php bloginfo('template_directory');?>/images/header.jpg" alt="xxx" width="xxx" height="xxx" />

    It's a good idea to do that for all the images you reference in your template files, that way the paths will never break.

    p.s. that ebook I suggested earlier is really good - if you're going to go deeper into creating your own themes I highly recommend you read it, or start looking at some tutorials on creating your own themes. Hopefully will take some of the pain out of this process. ;-)

  18. rlsdesigns1
    Member
    Posted 3 years ago #

    OMG....just changed to

    <img src="<?php bloginfo('template_directory');?>/images/header.jpg" alt="blah" width="890" height="300" />

    but still no go...i must stop b4 i drive myself (and you) nuts.....
    will resume at some point...

    i really appreciate your help!

  19. OK, for the record, the code on your site looks exactly the same to me, so something else is not right. Good luck!

  20. rlsdesigns1
    Member
    Posted 3 years ago #

    [Code moderated as per the Forum Rules. Please use the pastebin]

    this page is called splash.php

    I also changed the link to go to a different page...the whole thing seems broken...waah!

  21. Here is what I would do. Create a folder called "images" in your site root - http://polaroidarts.com/CLASSblog/images

    Upload your header.jpg there.

    Change your image path to:

    EDITED: <img src="/CLASSblog/images/header.jpg" alt="header" width="890" height="300" />

    I forgot that you are not using a WP header (as I usually do) via get_header() and I guess you cannot reference the template path unless you do that.

    Keep in mind that you'll need to change the path if you move this site to a different directory. (This is why I always create my test sites as sub-domains or try to use the template code I gave earlier - otherwise file paths can be a nightmare.)

  22. rlsdesigns1
    Member
    Posted 3 years ago #

    Hey that worked - sort of...the image is there (big YAY) but the page it's linking to is awry, and the rest of the blog/pages are missing....but, this is it for today! Again, thanks so much for practically holding my hand through this!

    Great rest of the weekend to you!

    -b

    OOps to the too many lines of code in my post..:/

  23. You're on your way. Congratulations. :-)

    Have a great weekend too!

  24. rlsdesigns1
    Member
    Posted 3 years ago #

    Hey There!

    just visited your web site - Nice! We both sort of have the same approach - creative and custom design! One reason i have stayed away from WP and the template world...but, i need to broaden the skill set....

    So, I changed the theme as i think i totally 'broke' what i was working on..!

    Here it is - new yet with same problem.....

    http://www.polaroidarts.com/NEWblog/

    In this theme there is a default 'Home' link - and cannot figure out how to 'merge' as it were, home and splash so they are not 2 separate pages as they are now.... Does that make sense.

    Thank you!!

    In fact i really like your site - http://www.lonelythebook.com/

    I would love to be able to have this type of layout and functionality in WP actually...

  25. creative and custom design! One reason i have stayed away from WP and the template world...

    Ah... but that's what's so great about already being a web designer when you learn WordPress. We are not limited to the pre-existing themes out there, we can create original ones! 99% of the WordPress work I do is original. I design my mockups in Photoshop and build my (non-WP) HTML templates first, then bring everything into WordPress. I use Starkers as a blank base theme for all the WordPress code, hooks, etc., making a copy of it and putting my original HTML in the appropriate files - header.php, footer.php, etc. There are some other blank themes in this Beginners Guide to WordPress presentation I gave with a colleague at a few WordCamps last year.

    In fact i really like your site - http://www.lonelythebook.com/

    Thanks a lot! That's a completely original theme, designed and built the way I mentioned earlier.

    As a designer working with WordPress, you are only limited by your imagination! There's no reason your sites need to look like the "typical" WordPress blog. In the presentation above we also link to a bunch of inspiration-type sites. I definitely suggest you check them out as well. For example: http://wpinspiration.com/

    In this theme there is a default 'Home' link - and cannot figure out how to 'merge' as it were, home and splash so they are not 2 separate pages as they are now.

    They are not separate pages from what I can see, but you do have them listed twice in your navigation. Would you do me a favour and start a new thread for that issue? It'll be easier to follow that way. Thanks. :-)

  26. rlsdesigns1
    Member
    Posted 3 years ago #

    Thanks! started new thread. Just downloaded Starkers..i think this is what i needed!

    Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.