WordPress.org

Support

Support » How-To and Troubleshooting » Full-width template

Full-width template

  • lapavlo11

    @lapavlo11

    Hi.
    I’ve tried to do a template without sidebar for my page:
    http://somanythoughts.pl/portfolio-2/
    . I’ve done a file: fullwidth.php and wrote CSS code in editor in wordpress but It didn’t work.

    fullwidth.php

    <?php
     /*
     Template Name: Full Width
     */
     ?>
    <?php get_header(); ?>
        <div id="single_cont-full">
            <div id="single_left-full">
                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                    <h1 class="single_title"><?php the_title(); ?></h1>
                    <div class="single_content-full">
                    <?php the_content(); ?>
                    </div><!--//single_content-->
                    <br /><br />
                    <?php //comments_template(); ?>
                <?php endwhile; else: ?>
                    <h3>Sorry, no posts matched your criteria.</h3>
                <?php endif; ?>
                <div class="clear"></div>
            </div><!--//single_left-->
            <div class="clear"></div>
        </div><!--//single_cont-->
    <?php get_footer(); ?>

    and CSS code

    #single_cont-full {
    	padding: 25px 0 0;
    }
    
    #single_left-full {
    	width: 700px;
    	margin: 0 auto;
    }

    Maybe someone can help me?
    Regards

  • The topic ‘Full-width template’ is closed to new replies.
Skip to toolbar