• Hi. I couldn’t find anything specifically about this here, and I thought I’d be able to figure it out by reading related threads, but sadly, I fail.

    I’m trying to make a page template that has nothing on it but the ‘content’, no header, menu, sidebar or footer. I’d prefer it not to even have the background image either.

    So, here is what I have:

    <?php /* Template Name: No-nothing
    */ ?>
    <div id="No-nothing">
    	<?php if (have_posts()) : while (have_posts()) : the_post() ?>
    		<div class="post-page-head"></div>
    		<div class="post-page" id="post-<?php the_ID() ?>">
    			<h2 class="pagetitle"><?php the_title() ?></h2>
    			<div class="entry">
    
    <?php the_content() ?>
    
    			</div>
    
    			<br class="clear-margins" />
    		</div>
    		<div class="post-page-foot"></div>
    	<?php endwhile; endif; ?>
    </div>

    I’ve experimented with this and it seems I’m getting close, but right away I’m encountering two problems:

    The page I made to test it has a NextGen Gallery on it, and for some reason, it’s displaying all the thumbnails in a single column along the left, instead of creating rows.

    Also, the Flash-based slideshow doesn’t work in this template – it gives this error:

    The Flash Player and a browser with Javascript support are needed..

    How can I make a page display nothing but the content, and maintain loop functionality?

Viewing 6 replies - 1 through 6 (of 6 total)
  • 1 Open up your header.php and save as header-gallery.php in your theme folder

    2 Open up header-gallery.php, keep everything from doctype to wrapper div after opening BODY tag

    <!DOCTYPE ...
    ...
    ...
    <body>
    <div id="wrapper">

    delete everything below in header-gallery.php

    3. Open up footer.php and save as footer-gallery.php in your theme folder

    4. Open up footer-gallery.php, delete from top line to just above closing div of #wrapper set up in footer-gallery.php in #2 above, so remaining text in footer-gallery.php is

    </div><!-- end of wrapper div -->
    </body>
    </html>

    5. In your special page template

    <?php /* Template Name: No-nothing
    */ ?>
    <?php get_header('gallery'); ?>
    ....
    insert the loop per your code above and create the page in Page > Add New and choose this template
    ...
    <?php get_footer('gallery'); ?>
    Thread Starter Teratoma

    (@teratoma)

    Wow! Thank you SO MUCH! I figured it would involve creating a separate header and/or footer, but such a thing is a little beyond my current skill set.

    I’ll let you know how this works out after I set it up – I just wanted to thank you for taking the time to do this.

    Thread Starter Teratoma

    (@teratoma)

    Can you tell me what you mean here?

    insert the loop per your code above…

    I have everything in place, but now the page is showing no content at all, just my background (which I’d also like to change, if I can get this to work.) I realize that text I quoted should be removed, but it sounds like I’m missing whatever it is that goes in its place.

    Thread Starter Teratoma

    (@teratoma)

    Ok, I figured out what needed to go in there. Is there a way to change the background? Ideally, I’d like this template to have no background, and to be able to specify the background on the individual pages somehow? Can this be done?

    Is there a way to change the background?

    Sure, there are different ways to change the background but it would be guesswork on my part since I cannot see the site source code and CSS. site url?

    Thread Starter Teratoma

    (@teratoma)

    https://bored.kevinbyrd.co.cc/wordpress/images/random-images

    My background is currently coming from my style sheet; can it be moved to the header?

    I’d like to be able to specify the background with an inline command, but I’m not having any luck – it only creates a background for the content, with the css background in the back.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Static page template with nothing but the content’ is closed to new replies.