Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to set up my site so that when I go to any post then it should show full width page. This theme already has a full width page but I wanted it to show in the default width page. How can I accomplish this? My website link is - http://techjagot.com

The code in single.php is :-

<?php get_header(); ?>
<?php
          setPostViews(get_the_ID());
?>

    <?php
    global $wp_query;
    $postid = $wp_query->post->ID;
    if ( get_post_meta( $postid, 'post_featpages', true ) == "Yes" ) { ?>
        <?php include (TEMPLATEPATH . '/featured-pages.php'); ?>
    <?php } ?>

    <?php if ( get_post_meta( $postid, 'post_featcontent', true ) == "Full Width Featured Content Slider"  ) { ?>
        <?php include (TEMPLATEPATH . '/featured-wide.php'); ?>
    <?php } ?>

    <div id="page" class="clearfix">

        <div id="contentleft">

            <?php if ( get_post_meta( $postid, 'post_featcontent', true ) == "Narrow Width Featured Content Slider" ) { ?>
                <?php include (TEMPLATEPATH . '/featured-narrow.php'); ?>
            <?php } ?>

            <?php if ( get_post_meta( $postid, 'post_featgalleries', true ) == "Yes" ) { ?>
                <?php include (TEMPLATEPATH . '/featured-galleries.php'); ?>
            <?php } ?>

            <?php if ( get_post_meta( $postid, 'post_featvideo', true ) == "Yes" ) { ?>
                <?php include (TEMPLATEPATH . '/featured-vids.php'); ?>
            <?php } ?>

            <div id="content" class="maincontent">

                <?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } ?>

                <?php include (TEMPLATEPATH . '/banner468.php'); ?>

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

            <div class="singlepost">

                <div class="post" id="post-main-<?php the_ID(); ?>">

                    <div class="entry">

                        <h1 class="post-title single"><a href="<?php the_permalink() ?>" rel="<?php _e("বুকমার্ক", "solostream"); ?>" title="<?php _e("Permanent Link to", "solostream"); ?> <?php the_title(); ?>"><?php the_title(); ?></a></h1>

                        <?php include (TEMPLATEPATH . '/postinfo.php'); ?>

                        <?php if ( get_post_meta( $post->ID, 'video_embed', true ) ) { ?>
                            <div class="single-video">
                                <?php echo get_post_meta( $post->ID, 'video_embed', true ); ?>
                            </div>
                        <?php } ?>

                        <?php the_content(); ?>

                        <div style="clear:both;"></div>

                        <?php wp_link_pages(); ?>

                        <?php if(function_exists('the_tags')) { the_tags('<p class="tags"><strong>'. __('ট্যাগসমূহ', "solostream"). ': </strong> ', ', ', '</p>'); } ?>
                        <p class="cats"><strong><?php _e('বিভাগ', "solostream"); ?></strong>: <?php the_category(', '); ?></p>

                    </div>

                    <?php include (TEMPLATEPATH . '/auth-bio.php'); ?>

                    <?php include (TEMPLATEPATH . '/related.php'); ?>

                    <?php comments_template('', true); ?>

                </div>

                <?php include (TEMPLATEPATH . "/bot-nav.php"); ?>

            </div>

stylesheet.php code

/* ---------[ Full-Width Layout Styles ]--------- */

.fwidth #page {}

.fwidth #contentleft {
    width: 100%;
    float:none;
    }

.fwidth #content {
    width: 908px;
    }

If anybody demands any other code for more info then please tell me. I will provide you guys with it.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

You have to edit your single.php for a full width design in your post view, is the single.php is responsible showing your post details.

Suppose, if your single.php looks like this:

+---------------------+
|                     |
+--------------+------+
|              |      |
|              |      |
|              |      |
|              |      |
|              |      |
+--------------+------+
+---------------------+

And your codes are like this:

<?php get_header(); ?>

<div id="content" class="single-content">
   CONTENT
<div>

<div id="sidebar">
   <?php get_sidebar(); ?>
</div>

<?php get_footer(); ?>

ACTION

Then to achieve the full width, you have to DELETE the sidebar div completely, and have to add a 100% width to the content like:

.single-content{width: 100% !important;}

This is just a concept. I hope you can find your solution from here.

share|improve this answer
    
thnks bro ... but i want also wide my single php header title,author name,comment... how i can do it.. my page show now width but title,comment it's not show full width –  Smart Shovon May 9 '13 at 8:19
    
Are you meaning a responsive design, that stretch out according to the screen/monitor? I'm asking this, because I found your layout with full width header. (as your aforementioned site is redirected) –  Mayeenul Islam May 13 '13 at 5:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.