Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    Senior Member Hitch - CP's Avatar
    Join Date
    Jun 2009
    Location
    London
    Posts
    120
    Member #
    19164
    Hi guys,

    I'm working on a new site which can be found here: - lmhc.co.uk

    Straight away you should see that there is a problem.

    I have made a template page/file:
    Code:
    <?php /*Template Name: Home Page*/ ?>
    In the wordpress backend, I have made a new page called 'Home Page'. I have set the home page template as 'Home Page' which, as explained before is the name of the template file.

    I then went into Settings > Reading and clicked on: A static page (select below) and selected 'Home Page' from the drop down menu.

    I have done the same for this site/template as I have with other wordpress sites. However, this time the template only gets the
    Code:
    <?php get_header(); ?>
    and
    Code:
    <?php get_footer(); ?>
    .

    It does NOT get any of the other html from inside the template, hence why the page looks empty apart from the back/header/footer.

    Does anybody have any ideas as to why this is happening?

    FYI - this was also the case when I had designed/viewed it locally on my computer i.e. http://localhost/wordpress

    Many thanks in advance for anybody who can shed some light on this problem.

    Ali
    Ali Hitch

    Portfolio & Tutorial Site
    www.alihitch.com

  2.  

  3. #2
    Member WPExplorer's Avatar
    Join Date
    Apr 2010
    Location
    USA
    Posts
    89
    Member #
    21716
    Could you provide the code for your homepage template. Since as you say it doesn't show up, there is no way for me to see what is wrong...

    But remember that it is a page template now...so if you added

    PHP Code:
    <?php if (have_posts()) : ?>
    <?php 
    while (have_posts()) : the_post();   ?>
    after
    PHP Code:
    <?php get_header(); ?>
    and you have'nt added any content within your home-page page then nothing will show until this:
    PHP Code:
    <?php endwhile; else: ?>
    If you want a static page remove the loop...This is the only problem I can think of without seeing your template file.

  4. #3
    Senior Member Hitch - CP's Avatar
    Join Date
    Jun 2009
    Location
    London
    Posts
    120
    Member #
    19164
    Quote Originally Posted by WPExplorer View Post
    Could you provide the code for your homepage template. Since as you say it doesn't show up, there is no way for me to see what is wrong...

    But remember that it is a page template now...so if you added

    PHP Code:
    <?php if (have_posts()) : ?>
    <?php 
    while (have_posts()) : the_post();   ?>
    after
    PHP Code:
    <?php get_header(); ?>
    and you have'nt added any content within your home-page page then nothing will show until this:
    PHP Code:
    <?php endwhile; else: ?>
    If you want a static page remove the loop...This is the only problem I can think of without seeing your template file.
    Here is the code of the template file. Thanks for looking at this.

    Code:
    <?php /*Template Name: Home Page*/ ?>
    
    <?php get_header(); ?>
    
    	<div id="carousel">
        </div><!--end #carousel-->
    
    	<div id="body">
        
        	<div id="row-top">
            	<div id="top-left">
                <h1>WHO ARE WE</h1>
                <p>We are a team of social deviants who love to go on tour and create some carnage! Our players come from a number of varying clubs around the country (well just surrey at the moment, sshh) such as the immensley popular and social Surbiton Hockey Club.</p>
                <p>The LastMinute Crusaders HC was founded by Paul Reeves and Ali Hitch who were trying to enter a team into the Shagfest Tournament (held yearly at Surbiton HC every last weekend of July) in 2006 but originally failed because of the sheer lack of any orgnaisation or effort. However! in the early morning during first day of matches, Paul and some other Surbiton members rallied together to phone everybody and anybody in their address books that could possibly play, while Ali went driving around to a few friends houses trying to recruit.</p>
                <p>So successful was this recruitment campaign that a whole team of 11 players (plus a few subs nicked from other teams over the course of the day) was available before lunch time that very day and so from thereon in, this team was coined 'Last Minute'. To this date the LastMinute Crusaders are unbeaten in open play having only lost matches through penalty flick contests and love to play 'total hockey'.</p>
                <p>If you are interested in joining this mighty touring team of epic proportions, take a quick peek at our <a href="#">contact page</a>.</p>
                </div><!--end #top-left-->
            	<div id="top-right">
                <h1>BLOG</h1>
                <p>Blog will be here soon.</p>
                </div><!--end #top-right-->
            </div><!--end #row-top-->
            <div id="row-mid">
            	<div id="mid-left">
                <h1>LATEST NEWS</h1>
                <p>Right now we are still working on completing our new and improved website! The new site will include a blog that will be regularly updated by the LMHC committee aswell as a forum that anybody can join, whether you are a LMHC member or not, just sign-up and start posting!</p>
                <p>A quick plea to all current and retired LMHC members - please can you contact one of the committee members if you have any of the following:
                <ul>
                	<li>any hi-resolution pictures of previous tour antics (basically any that are still on your camera)</li>
                    <li>any decent-ish quality videos still on camera on computer</li>
                </ul>    
                </p>
                </div><!--end #mid-left-->
            	<div id="mid-right">
                <h1>FORUM</h1>
                <p>Forum will be here soon.</p>
                </div><!--end #mid-right-->
            </div><!--end #row-mid-->
            <div id="row-btm">
            	<div id="btm-left">
                <h1>SHAGFEST 2010</h1>
                <p>After much deliberation and head scratching, the ever present committee are pleased to confirm that Shagfest 2010 will be taking place as usual from the evening of Friday 30th July-Sunday 1st August.</p>
    			<p>Below we have listed the important information about shagfest this year, pay attention!</p>
    			<br />
                <h2>theme</h2>
                <p>The theme this year is SUPPOSED to be 'dressed as famous dead people'. LMHC however have come up with their own little spin on the whole idea ...we will be going as <strong>Greek Gods</strong>! (you could say they are dead?)</p>
                <p><strong>** Keep a look out on the forum to find out which Greek God you shall be, which will of course be expertly decided by the committee as always while taking into account all 'aspects' of each member.</strong></p>
                <br />
                <h2>format</h2>
                <ul>
                	<li>15 minute, 1 way, 7-a-side matches</li>
                    <li>All teams must have a goal keeper or at least borrow one - in our case we may have to play 5s for the keeper spot if Paul fancy's another totally useless, yet amusing stroll upfront</li>
                </ul>
                <br />
                <h2>costs & what you get</h2>
                <ol>
                	<li>&pound;40 per person</li>
                	<li>DJ friday night, Band then DJ Saturday night</li>
                	<li>Breakfast, lunch and dinner on Saturday. Breakfast and lunch on Sunday</li>
                	<li>There will be a curry served on the Friday evening at an extra cost for those that want to eat</li>
    				<li>There will be a BBQ running all weekend if you want to graze which will be extra</li>
                	<li><strong>Complimentary jug of beer on arrival</strong></li>
                </ol>
                <br />
                <h2>what you need to bring</h2>
                <ul>
                	<li>tent &amp; sleeping bag</li>
                	<li>stick, shinpads &amp; flipflops</li>
                	<li>beer money</li>
                	<li>food money</li>
                    <li>toothbrush for those rough mornings</li>
                	<li>Bit 'o Bant</li>
                </ul>
                </div><!--end #btm-left-->
            	<div id="btm-right">
                <h1>SPONSORS</h1>
                <p>Click on each logo below to find out more about our sponsors:</p>
                <div id="etl-sponsor">
                <a href="#"></a>
                </div><!--end #etl-sponsor-->
                </div><!--end #btm-right-->
            </div><!--end #row-btm-->
            
        </div><!--end #container-body-->
    
    <?php get_footer(); ?>
    Ali Hitch

    Portfolio & Tutorial Site
    www.alihitch.com

  5. #4
    Member WPExplorer's Avatar
    Join Date
    Apr 2010
    Location
    USA
    Posts
    89
    Member #
    21716
    Everything here looks fine...weird

    Did you make sure you have defined both the Front Page and Posts page?

  6. #5
    Senior Member Hitch - CP's Avatar
    Join Date
    Jun 2009
    Location
    London
    Posts
    120
    Member #
    19164
    Hey AJ,

    Yep, that's what I thought, everything looks OK to me too :s

    Just added a static posts page but that hasn't changed anything, we still have the problem.

    Confused!
    Ali Hitch

    Portfolio & Tutorial Site
    www.alihitch.com

  7. #6
    Member WPExplorer's Avatar
    Join Date
    Apr 2010
    Location
    USA
    Posts
    89
    Member #
    21716
    Looks like its working now? What was the problem?

  8. #7
    Senior Member Hitch - CP's Avatar
    Join Date
    Jun 2009
    Location
    London
    Posts
    120
    Member #
    19164
    I just fiddled around with the back-end and it ended up working. Thanks for your help anyway.
    Ali Hitch

    Portfolio & Tutorial Site
    www.alihitch.com

  9. #8
    Junior Member
    Join Date
    May 2010
    Location
    Rimrock, AZ
    Posts
    4
    Member #
    22013
    Just as a side note for future reference, you should always try to name your static front page template something other than home page and when you create a page in the backend to assign the template call it main or something like that, never Home

  10. #9
    Junior Member
    Join Date
    Jul 2010
    Posts
    13
    Member #
    22751
    This is Ok now it looks like?


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:15 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com