• Resolved intothewhite

    (@intothewhite)


    Hi,

    I have an about page that uses a template I have created. The template is called about.php

    For some reason, the template isn’t outputting the whole page (my test page).

    Here’s my about.php file:

    <?php
    /*
    Template Name: About
    */
    ?>
    
    <?php get_header(); ?>
    
    <?php while (have_posts()) : the_post(); ?>
    
    	<?php $banner_text = get_post_meta($post->ID, 'banner_text', true); ?>
    
    	<div id="leader">
    
    		<h2><?php echo $banner_text; ?></h2>
    
    	</div>
    
    	<div id="content">
    
    		<?php the_content(); ?>
    
    <?php endwhile; ?>
    
    		<div id="extras">
    
    			<h3>From the blog</h3>
    
    			<h3>Stuff from the web I&apos;ve bookmarked</h3>
    
    		</div>
    
    	</div>
    
    <?php get_footer(); ?>

    As you can see, the content of the extras div isn’t being displayed. The extras div is separate because I’m going to use a couple of plugins there.

    Thanks,

    Leon

Viewing 4 replies - 1 through 4 (of 4 total)
  • Found this error in the stylesheet of this page, so it can´t work:
    <!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”>
    <html><head>
    <title>404 Not Found</title>
    </head><body>
    <h1>Not Found</h1>
    <p>The requested URL /test/front/style.css was not found on this server.</p>
    <p>Additionally, a 404 Not Found
    error was encountered while trying to use an ErrorDocument to handle the request.</p>
    <hr>
    <address>Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7a DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at intothewhite.co.uk Port 80</address>
    </body></html>

    Thread Starter intothewhite

    (@intothewhite)

    Thanks for replying.

    You’ve found an unrelated problem: I hadn’t got rid of the reference to the stylesheet I was using when it was a static, mockup page. I’ve done that, but the problem persists — unsurprising, as a missing stylesheet wouldn’t cause bits of the page to be displayed and others not.

    It’s a bit of an odd problem.

    — Leon

    `

    Thread Starter intothewhite

    (@intothewhite)

    I've figured out the problem (although it's not solved).

    For some reason, the page uses page.php as its template, not about.php. In wp-admin the page has been told to use About as its template (Manage - Page - Advanced - Page Template - About).

    I’m guessing this is a problem with the database?

    Thread Starter intothewhite

    (@intothewhite)

    It seems that calling the template file about.php and the page About causes a problem. Renamed the file (rather than the template) and everything's fine.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp not outputing whole of template’ is closed to new replies.