• Resolved ailinalei

    (@ailinalei)


    Hello there,

    A helper of mine made a template for me. Unfortunately, the sidebar on the blog page is on the wrong side. I want to have the blog on the right side and the sidebar on the left and my helper would not fix it for me. I’ve tried tweaking it and researching codes for the past few days, and nothing seems to work for me. Please help. My blog link is: https://cakedla.com/wordpress/?page_id=10.

    blog_template.php code is:

    <?php
    /*
    Template Name: Blog - Left Sidebar
    */
    ?>
    
    <?php get_header(); ?>
    <div class="leftclass">
    <?php get_sidebar();
    $pagenum = $wp_query->query_vars;
    $pagenum = $pagenum['paged'];
    
    if (empty($pagenum)) {
    $pagenum = 1;
    }
    
    query_posts("posts_per_page=10&paged=$pagenum");
    ?>
    
    	<div id="content">
    
    	<?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    
    			<div class="post" id="post-<?php the_ID(); ?>">
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    				<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
    
    				<div class="entry">
    					<?php the_content('Read the rest of this entry &raquo;'); ?>
    				</div>
    
    				<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
    			</div>
    
    		<?php endwhile; ?>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link('Older Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Newer Entries') ?></div>
    		</div>
    <p>&nbsp;</p>
    	<?php else : ?>
    
    		<h2 class="center">Not Found</h2>
    		<p class="center">Sorry, but you are looking for something that isn't here.</p>
    		<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    
    	<?php endif; ?>
    
    	</div>
    
    </div>
    
    <?php get_footer(); ?>

    Thank you so much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • In style.css, remove the margin-left and padding-left lines under #content at line 245:

    .leftclass #content {
       margin-left:255px;
       padding-left:15px;
       padding-right:15px;
    }

    In #sidebar at line 125, change float: left; to float: right;

    #sidebar {
       float:left;
       padding-left:5px;
       width:230px;
    }
    Thread Starter ailinalei

    (@ailinalei)

    hi vtxyzzy!

    It works great! thank you so much! i’m not a css expert and i tried to fix the previous/next navigation buttons since they are in a weird location right now. how would i fix that to make the navigations in the bottom? Thanks so much!!!

    Thread Starter ailinalei

    (@ailinalei)

    Nevermind! I finally figured out the css! Thank you so much!!! =)

    You are welcome!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Blog Template Help’ is closed to new replies.