• so im working locally on a wordpress site and came into a problem, all the other pages use the section tag which i styled to be a full width page, however my blog page i want to have sidebars.

    there is no section tag in the loop.php file, tried making a new template called blog.php and copying the loop info into it, while i can set the blog page to the new template none of the changes save so i started just editing the loop.php file which seems to work.

    now the problem is there is no section tag there but it still uses it from what i can see, i was able to resize the blog content by adding a div with a smaller width but it still appears in the section tag and the sidebar no matter where i move it will not sit correctly.

    here is the loop code:

    <div class="grid9">		<!-- 1/3 column start -->
    
    <?php if (have_posts()): while (have_posts()) : the_post(); ?>
    
    	<!-- article -->
    	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    		<!-- post thumbnail -->
    		<?php if ( has_post_thumbnail()) : // Check if thumbnail exists ?>
    			<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
    				<?php the_post_thumbnail(array(120,120)); // Declare pixel size you need inside the array ?>
    			</a>
    		<?php endif; ?>
    		<!-- /post thumbnail -->
    
    		<!-- post title -->
    		<h2>
    			<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
    		</h2>
    		<!-- /post title -->
    
    		<!-- post details -->
    		<span class="date"><?php the_time('F j, Y'); ?> <?php the_time('g:i a'); ?></span>
    		<span class="author"><?php _e( 'Published by', 'html5blank' ); ?> <?php the_author_posts_link(); ?></span>
    		<span class="comments"><?php comments_popup_link( __( 'Leave your thoughts', 'html5blank' ), __( '1 Comment', 'html5blank' ), __( '% Comments', 'html5blank' )); ?></span>
    		<!-- /post details -->
    
    		<?php html5wp_excerpt('html5wp_index'); // Build your custom callback length in functions.php ?>
    
    		<?php edit_post_link(); ?>
    
    	</article>
    	<!-- /article -->
    
    <?php endwhile; ?>
    
    <?php else: ?>
    
    	<!-- article -->
    	<article>
    		<h2><?php _e( 'Sorry, nothing to display.', 'html5blank' ); ?></h2>
    	</article>
    	<!-- /article -->
    
    	</div><!-- 1/3 column end -->
    <?php get_sidebar(); ?>
    
    <?php endif; ?>
    
    <div class="clear"></div>
    <div class="spacerfooter"></div>

    css for the grid is:

    .grid9 {
    	width: 726px;
    }
    section{
    	background-color:#FFF;
    	width:1200px;
    	margin:0 auto;
    	box-shadow:0px 4px 6px -4px #333;
    	padding:5px;
    	border:1px solid #000;
    	margin-top:20px;
    	margin-bottom:250px;
    	padding-left:15px;
    	padding-right:15px;
    }

    is there a way to get the sidebar into the section or a way to make a separate section for this page?

    thanks

  • The topic ‘and page layout’ is closed to new replies.