• Hi there, sorry to bug people but there doesn’t seem to be an answer to this at all…

    I have a few wordpress sites and on a couple of them i’d like to have a static page as the landing page that just has the header/footer, and nothing else in-between except the HTML that I want to put there.

    Maybe I’m missing something stupidly obvious but I’ve looked and looked.

    I’m sure there is a solution with WordPress being one of the leaders in blogging solutions ??

    Looking forward to an answer to this,
    TIA,
    Mark.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Create a custom page template that incorporates The Loop but doesn’t use the_content or the _excerpt but your HTML instead. Create a WP Page, assign your new template to it and publish it. Finally, use Admin/Settings/Reading to change your front page display to a static page and use the dropdown to select your newly created Home page.

    Thread Starter cruelworld

    (@cruelworld)

    Thanks for your reply, i’ve been looking into it and it’s going to take a bit of messing about with to try and get my head around this Loop thing.

    I’m not entirely sure I need this Loop function at all to be honest, but I may be missing the point of it entirely.

    All i’m looking to do with this page really is have a header and footer and hopefully content area so that it matches the main site but have it spread across the whole page without a sidebar (does that make any sense? )

    I have created a custom template but am totally lost with what to put in it to create a simple page with no sidebars, no widgets or anything like that …
    Just a content area that will match the other pages that I can use the template for to create a landing page.

    Maybe this could be a standard template to be included in future versions…

    Back to the messing then eh ??

    Thanks for reading,
    Regards,
    Mark.

    Hi Mark,

    I did a quick write up on how to create a page that uses your template to display headers and footers for a page on your blog, you can find it here:
    https://joe-riggs.com/blog/2009/07/create-blank-page-for-wordpress-blog-using-your-theme-template/

    Hope this helps.

    <?php
    /*
    Template Name: My Page
    */
    ?>
    <?php get_header(); ?>
    <div id="content">
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    [ your markup goes here ]
    
    <?php endwhile; endif; ?>
    
    </div>
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    is a rough example. Adjust the calls to your header, sidebar and footer calls appropriately.

    Thread Starter cruelworld

    (@cruelworld)

    Hi there again.
    Sorry it’s taken so long but I was sidetracked by more important issues and completely forgot about this.

    Thanks for all your help and you’ll be pleased to know that due to your help the front page issue is now complete.

    However it has caused a sort of side effect that I can’t fix.

    I have my permalinks set to /%postname% if that makes any difference and although the front page looks great I cannot seem to get a link back to my main blog.

    The address if you want to see what I mean is https://www.free-mobilephone.co.uk

    How can I get a link back to my main blog posts on the navbar so that people can read the blog properly ?

    Thanks again for the help,
    Much appreciated.

    Regards,
    Mark.

    Go to pages and create a blank page called blog and save it. Then go to settings>>>reading and where you have post page select blog from the drop down menu.

    Thread Starter cruelworld

    (@cruelworld)

    Just tried that and all it does is call the main page.
    Any clues ?

    Sorry to be a pain :S

    Thread Starter cruelworld

    (@cruelworld)

    Right, all done ??

    After lots of messing about I ended up having to comment out the code in header.php that placed the HOME link because it was duplicated with the page that was created.

    I’m sure this is probably the wrong way around things but it’s working.

    Thanks again got all the help ??

    Mark.

    Thread Starter cruelworld

    (@cruelworld)

    Right, all done ??

    After lots of messing about I ended up having to comment out the code in header.php that placed the HOME link because it was duplicated with the page that was created.

    I’m sure this is probably the wrong way around things but it’s working.

    Thanks again got all the help ??

    Mark.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Blank Static Page’ is closed to new replies.