• Resolved Weili

    (@weili)


    I would like to create a blank homepage with just two links, one to an external site, the other to the rest of the website.

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • From your dashboard, go to Page >> Add New then make the new page have just the two links. Then go to Settings >> Reading, select “A static page”, and then choose the page you just created from the drop down.

    However, if that page isn’t blank enough because it incorporates elements of your theme, you’ll need to create a new template file. You can access your site via ftp, navigate to yoursite.com/wp-content/themes/yourcurrenttheme and drag in a text document you’ve created on your computer called whatever.php, with the content:

    <?php
    /*
    Template Name: Whatever the name of this is
    */ ?>
    
    Go to this <a href="https://www.cnn.com">external site</a> or <a href="mygreatsite.com">Proceed</a>

    You can also more easily create a custom theme template file like this with the FTP-Free Theme File Creator Plugin I built.

    Once you’ve done that, create a new page, and before you publish it, look over on the right side where you’ll see “Page Attributes” which has a “Template” dropdown. You’ll see the file you created there. Choose it and publish.

    Thread Starter Weili

    (@weili)

    Thanks for your reply Dandy!

    I have created the php file and dropped it to the root of my theme’s directory. However, it is not showing up as an option under the Template dropdown.

    Hmmm… And you put the above code into the file? Make sure the template name (where I wrote ‘whatever the name of this is’ ) is unique

    Thread Starter Weili

    (@weili)

    Below is exactly what I have in my php file, which I named it home.php.

    <?php
    /*
    Template Name: Home
    */ ?>
    
    Go to this <a href="https://www.cnn.com">external site</a> or <a href="mygreatsite.com">Proceed</a>

    I haven’t changed the links yet as I wanted to get it working first.

    Thanks.

    Maybe ‘home’ is reserved? Try something random and see if it fixes

    Thread Starter Weili

    (@weili)

    Thank you very much!!! It worked!

    Indeed “home” is reserved so changing it worked! Thanks again!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to create a blank homepage?’ is closed to new replies.