Viewing 15 replies - 1 through 15 (of 26 total)
  • Your homepage can have a completely different layout and/or look-and-feel than other pages – not to worry.

    Thread Starter rlsdesigns1

    (@rlsdesigns1)

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

    Thanks!

    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.

    Thread Starter rlsdesigns1

    (@rlsdesigns1)

    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!!

    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!

    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: https://codex.www.ads-software.com/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.)

    Thread Starter rlsdesigns1

    (@rlsdesigns1)

    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

    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:

    https://codex.www.ads-software.com/Template_Hierarchy

    Thread Starter rlsdesigns1

    (@rlsdesigns1)

    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…

    :/

    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!

    Thread Starter rlsdesigns1

    (@rlsdesigns1)

    Thanks for hanging with me Z as i try to figure this out!

    I did all you suggested and this is what comes up:

    The whole idea for me is to get rid of all the blogging features…just want a splash page of sorts, with maybe one link (or image) that when clicked on, user will enter the site/blog…

    I think i need someone hanging over my shoulder to get this…;/

    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.

    Thread Starter rlsdesigns1

    (@rlsdesigns1)

    no – i desire something like this:

    https://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?
    ??

    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 https://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. ??

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘Would like a splash type home page’ is closed to new replies.