Left Sidebar is not on left. It is staying on top
-
Hello.
My page is: https://216.119.90.168/wordpress/?page_id=2I am using the Creativix theme.
I was trying to switch the sidebar from the right to the left. I got the side bar “to move” but now it is sitting “on top” of the page
If you look, the “Search Bar” and “Our Services” is suppose to be on the left of the main content of the page and the main content is suppose to be on the Right. The narrow darker grey vertical “bar” (that is currently on the right) is NOT suppose to be there. I want THAT as the left sidebar. However, the left sidebar is now “sitting on top” of it. And the Right side bar, still has the background color.
I basically wanted to just switch the sidebar from the left to the right. Please help if you can. Thank you!
Scott
Scott
-
Can you post your index.php code? (Use pastebin…)
Hi FlyFX…thanks for replying… index.php is below
<?php
/**
* Front to the WordPress application. This file doesn’t do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*//**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define(‘WP_USE_THEMES’, true);/** Loads the WordPress Environment and Template */
require(‘./wp-blog-header.php’);[ Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still – use the pastebin for 235 lines like that. ]
sorry…wrong one above…apologies…below is the THEME index.php
<?php get_header(); ?> <?php global $post; if(!empty($wpcx_cxOptions["slide_max"])) { $wpcx_slide_max = $wpcx_cxOptions["slide_max"]; } else { $wpcx_slide_max = 0; } if(!empty($wpcx_cxOptions["slide_sort"])) { $wpcx_slide_sort = $wpcx_cxOptions["slide_sort"]; } else { $wpcx_slide_sort = "date"; } if(!empty($wpcx_cxOptions["slide_order"])) { $wpcx_slide_order = $wpcx_cxOptions["slide_order"]; } else { $wpcx_slide_order = "DESC"; } if(!empty($wpcx_cxOptions["slide_show"])) { $wpcx_slide_show = $wpcx_cxOptions["slide_show"]; } else { $wpcx_slide_show = "yes"; } if($wpcx_slide_show != "no") { $wpcx_args = array( 'meta_key' => 'feat_slideshow', 'meta_value'=> '1', 'suppress_filters' => 0, 'post_type' => array('post', 'page'), 'post_status' => 'publish', 'numberposts' => $wpcx_slide_max, 'orderby' => $wpcx_slide_sort, 'order' => $wpcx_slide_order); $wpcx_myposts = get_posts($wpcx_args); if(!$wpcx_myposts) { $wpcx_args = array('suppress_filters' => 0, 'post_type' => array('post', 'page'), 'post_status' => 'publish', 'numberposts' => $wpcx_slide_max, 'orderby' => $wpcx_slide_sort, 'order' => $wpcx_slide_order); $wpcx_myposts = get_posts($wpcx_args); } if($wpcx_myposts) { ?> <div id="slide_wrapper"> <ul id="slideshow"> <?php foreach( $wpcx_myposts as $post ) : setup_postdata($post); $wpcx_slideshow_title = get_the_title(); $wpcx_slideshow_text = wpcx_cut_text(get_the_excerpt(), 290); $wpcx_thumb_big = wpcx_get_wp_generated_thumb("slideshow"); if(empty($wpcx_thumb_big)) { $wpcx_thumb_big = get_template_directory_uri()."/images/default_slideshow.jpg"; } ?> <li><img src="<?php echo $wpcx_thumb_big;?>" alt="<?php the_title();?>" /><div class="slide_text"><h1><a>"><?php the_title();?></a></h1> <?php /* 6/22/12 COMMENTING OUT TO REMOVE DATES AND COMMMENTS OF POST <span class="date">Published <?php the_time('F j, Y'); ?> - <?php comments_number('No Comments','One Comment','% Comments'); ?></span> */ ?> <p><?php echo $wpcx_slideshow_text;?></p><a>">read more</a></div></li> <?php endforeach; ?> <div class="slide_nav"> <ul id="slide_navigation"> <?php foreach( $wpcx_myposts as $post ) : setup_postdata($post); $wpcx_thumb = wpcx_get_wp_generated_thumb("slideshow_thumb"); if(empty($wpcx_thumb)) { $wpcx_thumb = get_template_directory_uri()."/images/default_slideshow_small.jpg"; } ?> <li><a href="#"><img src="<?php echo $wpcx_thumb;?>" alt="<?php the_title();?>" /></a></li> <?php endforeach; ?> <a href=""></a> <a href=""></a> </div> </div> <?php } } ?> <div id="big-column"> <div id="column-top"> </div> <div id="column-content"> <?php global $post; if(!empty($cxOptions["featured_sort"])) { $feat_sort = $cxOptions["featured_sort"]; } else { $feat_sort = "date"; } if(!empty($cxOptions["featured_order"])) { $feat_order = $cxOptions["featured_order"]; } else { $feat_order = "DESC"; } $args = array( 'meta_key' => 'feat_front', 'meta_value'=> '1', 'suppress_filters' => 0, 'post_type' => array('post', 'page'), 'post_status' => 'publish', 'numberposts' => 2, 'orderby' => $feat_sort, 'order' => $feat_order); $myposts = get_posts( $args ); if(!$myposts) { $args = array('suppress_filters' => 0, 'post_type' => array('post'), 'post_status' => 'publish', 'numberposts' => 2, 'orderby' => $feat_sort, 'order' => $feat_order); $myposts = get_posts( $args ); } foreach( $myposts as $post ) : setup_postdata($post); $thumb = wpcx_get_wp_generated_thumb("feat_thumb"); ?> <div class="feat-post" id="feat-post-<?php the_ID();?>"> <h2><a>" title="<?php the_title();?>"><?php the_title();?></a></h2> <?php /* 6/22/12 COMMENTING OUT TO REMOVE DATES AND COMMMENTS OF POST <h3>Published <?php the_time(get_option('date_format')); ?> at <?php the_time(get_option('time_format'));?> - <?php comments_number('No Comments','1 Comment','% Comments'); ?></h3> */ ?> <?php the_excerpt();?> <a>"><?php if($thumb) {?><img src="<?php echo $thumb;?>" alt="" /><?php } ?></a> </div> <?php endforeach; ?> <div class="latest-posts"> <h2>Latest Articles</h2> <h3>Latest Articles from the Blog</h3> <ul class="latest-posts"> <?php wp_reset_query(); query_posts("posts_per_page=8&orderby=date&order=DESC"); while (have_posts()) : the_post(); ?> <li id="latest-post-<?php the_ID();?>"><a>" title="<?php the_title();?>"><?php the_title();?></a><span class="date">Published <?php the_time(get_option('date_format')); ?> at <?php the_time(get_option('time_format'));?></span> <?php endwhile;?> </div> </div> <?php get_footer(); ?>
using pastebin:
1. The theme’s index.php
https://pastebin.com/embed_js.php?i=nX20NaEg2. The theme’s page.php
https://pastebin.com/embed_js.php?i=hhiHDqTH2. The theme’s style.php
https://pastebin.com/embed_js.php?i=TUNSeMpyThis pastebin thing is pretty cool!
To be honest, i’ve never worked with Creativix before, and in truth i’m no expert with WP, i’m still learning by doing, so-to-speak, buuuuuuut, try this…
First, back-up your page.php then use the editor to change your page.php on the server to this code instead.
The get_sidebar(‘left’) call seems to be inside the #post div which it shouldn’t be, it should be outside the main post div above get_footer().
In your style.css, find .sidebar and where it says ‘float: left’ change it to ‘float: right’ . This “should” bring the sidebar outside the post div, to the right of it, before putting the footer at the bottom where it belongs.
If it doesn’t work, just replace your page.php with your back-up one and all should be back to the way it is now.
Let me know and i’ll look it into it, cos no-one else seems to be helping ??
Thank you SO much!!!!
Ok….so…it did something….but not exactly what I was hoping for….
It moved the sidebar to the bottom now….however, the .sidebar “right” only moves the “search bar” and “Our Services” (basically the content IN the sidebar) to the right WITHIN the sidebar….
https://picpaste.com/sidebar_on_bottom-Di7trLyx.png
https://216.119.90.168/wordpress/?page_id=2I used picpaste to show you as I am going to spend more time on it and it may be moved around by the time you see it…
OK FlyFX….I am getting a LOT closer…
There is soemthing “pushing” the first paragraph of the text to the right and then letting the rest of the text align all the way to the left…all of that content should be in the “light grey” area. I think it is something in the sidebar…
Here is my code:
Page.php
https://pastebin.com/embed_js.php?i=UFVSMMDT
style.php
https://pastebin.com/embed_js.php?i=xAnvV41b
single.php
https://pastebin.com/embed_js.php?i=SCDXURE3
index.php
https://pastebin.com/embed_js.php?i=SyT7sXE0Please help if you can….any advice is appreciated!
Scott
I was trying to switch the sidebar from the right to the left.
no need to edit any templates – the changes can be done with a few edits in style.php (based on a clean install of the theme);
.content { width: 620px; float: right; /*EDIT*/ padding: 10px 15px 10px 10px; /*EDIT*/ overflow: hidden !important; }
and
.sidebar { width: 220px; float: right; /*EDIT*/ margin-right: 30px; /*EDIT*/ margin-top: 0px; padding-bottom: 50px; }
and obviously edit the backgroung image /images/sub-content.png by just flipping it horizontally and moving it 2 pixels to the left.
alchymyth –
YOU are an absoulute GENIUS!!!! OMG…I spent at least 10 hours trying to do what you did…I learned a TON in the process which is good….I cannot thank you enough. Did I say thank you?
FlyFX – Thank you SO much too for getting in the ring and giving it as shot…I truly appreciate it.
Scott
- The topic ‘Left Sidebar is not on left. It is staying on top’ is closed to new replies.