Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   [SOLVED] Move sidebars to one side? (http://forum.bytesforall.com/showthread.php?t=168)

evilsciencechick Feb 2, 2009 08:42 PM

[SOLVED] Move sidebars to one side?
 
Hi everyone! I just recently installed this theme and I'm really liking it! One thing I'd really like to do, if possible, would be to have both sidebars on one side. I was able to do this with my previous theme (K2), and I was wondering if was possible with this theme.

Thanks for your help!

http://evilsciencechick.com

Flynn Feb 2, 2009 08:52 PM

The theme is prepared to do that even though it is not implemented as an automated feature. I might be missing something but this should work:

Cut the following from header.php:

PHP Code:

<?php if ( $left_col == "on" ) { ?>
<!-- Left Sidebar -->
<td id="left">

<?php // Widgetize the Left Sidebar
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) :
endif; 
?>

</td>
<!-- / Left Sidebar -->
<?php ?>

and paste into footer.php, right before this:

PHP Code:

<?php if ( $right_col == "on" ) { ?>
<!-- Right Sidebar -->
<td id="right">

<?php // Widgetize the Right Sidebar
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) :
endif; 
?>

</td>
<!-- / Right Sidebar -->
<?php ?>

Go back to header.php and change this:

PHP Code:

<colgroup>
<?php if ( $left_col == "on" ) { ?>
<col class="colone" />
<?php ?>
<col class="coltwo" />
<?php if ( $right_col == "on" ) { ?>
<col class="colthree" />
<?php ?>
</colgroup>

to this:

PHP Code:

<colgroup>
<col class="coltwo" />
<?php if ( $left_col == "on" ) { ?>
<col class="colone" />
<?php ?>
<?php 
if ( $right_col == "on" ) { ?>
<col class="colthree" />
<?php ?>
</colgroup>


evilsciencechick Feb 2, 2009 09:13 PM

That worked great! Thanks!

Flynn Feb 2, 2009 09:26 PM

Great, you were the first to test this as far as I know...

If you want to move the right border of the left sidebar to its left side, change Atahualpa Theme Options -> Sidebars -> LEFT sidebar style

HTML Code:

border-right: dashed 1px #CCCCCC;
to

HTML Code:

border-left: dashed 1px #CCCCCC;

evilsciencechick Feb 3, 2009 04:21 PM

even better! thanks!

Flynn Feb 3, 2009 04:38 PM

Thank you for the donation.

Marie_Jensen Feb 17, 2009 01:17 PM

Hi,
new here and just learning to theme and love it!!
I have tried to make theese changes to have my sidebars on one side but I can not find
Quote:

<colgroup>
<?php if ( $left_col == "on" ) { ?>
<col class="colone" />
<?php } ?>
<col class="coltwo" />
<?php if ( $right_col == "on" ) { ?>
<col class="colthree" />
<?php } ?>
</colgroup>
in my theme, I have the latest version and I would love to have my bars as I want them, thanks

Flynn Feb 17, 2009 05:54 PM

Quote:

Originally Posted by Marie_Jensen (Post 1654)
Hi,
new here and just learning to theme and love it!!
I have tried to make theese changes to have my sidebars on one side but I can not find
in my theme, I have the latest version and I would love to have my bars as I want them, thanks

This should be around line 872-880 in /wp-content/themes/atahualpa/header.php

Marie_Jensen Feb 18, 2009 04:49 AM

Hi,
found the lines and made the changes as instructed but, my left sidebar is now acting as the contentcolumn with lots of space and my contentcolumn is transformed to a sidebar at the right, what more should I change in the code to have right columns as sidebar?

Marie

Flynn Feb 18, 2009 02:44 PM

That's a fairly uncritical change, it should work. Try again. Or, let me see the error in action. Seems you've changed it back. I'll be around the next few hours

Marie_Jensen Feb 19, 2009 02:31 AM

Hi again,
tried once agian and I succeeded to have both my sidebar as I wanted, I deleted a lot of blanc rows in the header file were I cut the first text and after that it showed just fine, thank you for a lovely theme and I am looking forward to keep on improving and developing my site.

Have a nice day
Marie:)

hospitalera Mar 25, 2009 01:10 PM

It worked for me also and I am nearly codephobic ;-) I show the blog of when I am finished customizing the heck out of it. Your theme is the best thing invented for wordpress since sliced bread (excuse the dodgy metaphore, you know what I mean!) SY

hospitalera Mar 25, 2009 02:52 PM

Zu frueh gefreut ;-( I was singing Alleluia a bit too early, now the widget spacing of the left side bar is uneven. Can somebody please have a look at http://hospitalera.com/ and tell me how I managed to mess it up? Thanks a lot! SY
PS I left it in the default setting for the widget spacing, so it must be something what I did wrong whilst switching the site bars ;-(

Flynn Mar 25, 2009 06:11 PM

You've put various seemingly unnecessary DIV's inside the text widgets, and one of those DIV's is probably not closed, leading to text widgets being inside each other. If you clean up the content of the text widgets the margins between widgets should come back.

hospitalera Mar 26, 2009 01:56 AM

Big Ooops, it worked, sorry for asking so many stupid questions and thanks for the help. SY

evripidis Apr 21, 2009 03:42 PM

Greetings

I'm using this great theme and i 've made this hack for the sidebars.
Unfortunately, i have a small situation.

After the hack, my site (www.macedonas.gr) have an horizontal scroll bar and i can't figure it out why. I've shanged the size of my banner, but nothing changed.

Any suggestions ?

Thanks a lot in advanced

PS. Also i've noticed that there is one more option at the widgets sidebars menu. "Invisible Widget Area"
What is that ?

Flynn Apr 21, 2009 11:27 PM

Your site didn't load for me, I waited a minute. Feel free to post again when it loads

The invisible widget area is probably from your former theme, go back to that theme, remove any widgets that may still be in there, then switch to Atahualpa again.

Or it might be from the plugin "Tabbed Widgets"

evripidis Apr 22, 2009 03:18 AM

I think that you'll be able to see it now. It loads for me

evripidis Apr 22, 2009 06:08 PM

Quote:

Originally Posted by Flynn (Post 5388)
You site didn't load for me, I waited a minute. Feel free to post again when it loads

The invisible widget area is probably from your former theme, go back to that theme, remove any widgets that may still be in there, then switch to Atahualpa again.

Or it might be from the plugin "Tabbed Widgets"

The invisible widget area you were right was from the Tabbed Widget (please any update about that :) ?)

I've cleared old unwanted widgets-extensions. Also i don't have any other themes installed, but the blank space still exists.
I though maybe something went wrong at cut-copy-paste inside the code, but i doubled check it and i can't find anything (as far as i can see).

Any ideas ?

Flynn Apr 22, 2009 08:16 PM

Your "CSS Compress" plugin isn't working

evripidis Apr 23, 2009 05:46 AM

Quote:

Originally Posted by Flynn (Post 5463)
Your "CSS Compress" plugin isn't working

Why is that ?

Finally i've fix the blank. Probably some widget malfuction.

Lucker May 7, 2009 02:46 AM

Quote:

Originally Posted by Flynn (Post 735)

Cut the following from header.php: ...

Go back to header.php and change this:...


Does it suppose to work with Atahualpa 3.3.3?

Flynn May 7, 2009 02:57 AM

Yes it should

kanotisten May 8, 2009 01:37 PM

First of all: Thanks for a great theme!

I have both sidebars on the right side and now I would like to get the "Featured content" above both these sidebars on the right side (http://www.personkryss.se). I am really frustrated because I can't seem to get it to work.

Does anyone have a tip?

thanks!

evripidis May 8, 2009 07:44 PM

Ok i found the solution. The code has changed, so Flynn i'm rewriting here the update of the code-trick above. i hope that will help others too :)


Cut the following from header.php:

PHP Code:

<?php if ( $bfa_ata['left_col'] == "on" ) { ?>
        <!-- Left Sidebar -->
        <td id="left">

            <?php // Widgetize the Left Sidebar 
            
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : ?>
        
                    <div class="widget widget_categories"><div class="widget-title">
                    <h3><?php _e('Categories','atahualpa'); ?></h3>
                    </div><div class="widget-content">
                    <ul>
                        <?php wp_list_categories('show_count=1&title_li='); ?>
                    </ul>
                    </div></div>
                    
                    <div class="widget widget_archive"><div class="widget-title">
                    <h3><?php _e('Archives','atahualpa'); ?></h3>
                    </div><div class="widget-content">
                    <ul>
                        <?php wp_get_archives('type=monthly'); ?>
                    </ul>
                    </div></div>
                                    
            <?php endif; ?>

        </td>
        <!-- / Left Sidebar -->
        <?php ?>

and paste into footer.php, right before this:

PHP Code:

<?php if ( $bfa_ata['right_col'] == "on" ) { ?>
<!-- Right Sidebar -->
<td id="right">

    <?php // Widgetize the Right Sidebar
    
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : ?>

        <div class="widget"><div class="widget-title">
        <h3>Recent Posts</h3></div><div class="widget-content">
        <?php $r = new WP_Query(array(
            
'showposts' => 20,
        
//    'cat__in'=>array(14),
            
'cat__not_in'=>array(15,80),
            
'what_to_show' => 'posts',
            
'nopaging' => 0,
            
'post_status' => 'publish',
            
'caller_get_posts' => 1));
        if (
$r->have_posts()) : ?>
        <ul>
        <?php  while ($r->have_posts()) : $r->the_post(); ?>
        <li><a href="<?php the_permalink() ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?> </a></li>
        <?php endwhile; ?>
        </ul>
        <?php wp_reset_query();  // Restore global post data stomped by the_post().
        
endif; ?>
        </div></div>

        <div class="widget"><div class="widget-title">
        <?php wp_list_bookmarks('category_before=&category_after=&title_before=<h3>&title_after=</h3></div><div class="widget-content">'); ?>
        </div></div>

        <div class="widget"><div class="widget-title">
        <h3><?php _e('Meta','atahualpa'); ?></h3>
        </div><div class="widget-content">
        <ul>
            <?php wp_register(); ?>
            <li><?php wp_loginout(); ?></li>
            <li><a href="http://wordpress.org/" title="
            <?php _e('Powered by WordPress, state-of-the-art semantic personal publishing platform.','atahualpa'); ?>">
            <?php _e('WordPress','atahualpa'); ?></a></li>
            <?php wp_meta(); ?>
        </ul>
        </div></div>

    <?php endif; ?>

</td>
<!-- / Right Sidebar -->
<?php ?>

Go back to header.php and change this:

PHP Code:

<colgroup>
<?php if ( $bfa_ata['left_col'] == "on" ) { ?>
<col class="colone" />
<?php ?>
<col class="coltwo" />
<?php if ( $bfa_ata['right_col'] == "on" ) { ?>
<col class="colthree" />
<?php ?>
</colgroup>

to this:

PHP Code:

<colgroup>
<col class="coltwo" />
<?php if ( $bfa_ata['left_col'] == "on" ) { ?>
<col class="colone" />
<?php ?>
<?php 
if ( $bfa_ata['right_col'] == "on" ) { ?>
<col class="colthree" />
<?php ?>
</colgroup>

I don't know if i'm perfectly right (Flynn ?) cause there is the new widget code inside, but as i can see, it works now for me.

Flynn May 8, 2009 08:06 PM

Yes that should work. Thank you

The new code looks like it had changed a lot but the added code is just a few default hard coded widgets so novice users have something in the sidebars even without adding widgets, i.e. a Meta Widget with login link.

liabelle May 10, 2009 08:04 AM

Quote:

SOS!!!
Is this working after the 3.3.3 ? Cause i've done the steps again, the left sidebar moved to the right but it falls up in the other sidebar!!!
Also the "one bar" now is gone far righter, out of the main page. I have to scroll to see it
I have experienced the same:(

Any solution? Thanx!

evripidis May 10, 2009 10:19 AM

I've wrote the solution just 2 post before !!! Did you read the thread ???

mugger Jun 6, 2009 10:21 AM

Ok, I'll try 2 col on right.
Will name-suffix let me have multiple versions of theme?
e.g., atahualpa-2R, atahualpa-2L

Flynn Jun 10, 2009 04:35 AM

Yes, you can run mutliple versions of the theme with each theme in its own directory

/wp-content/themes/atahualpa/
/wp-content/themes/atahualpa3/
/wp-content/themes/atahualpa333/
/wp-content/themes/atahualpa32/

All themes would share the same theme settings (everything saved through "Atahualpa Theme Options") but the theme files (all manual edits of theme files) would be different

ciocchi Jun 16, 2009 06:03 AM

I try but after do the change in header and footer my site isn work:
Parse error: syntax error, unexpected T_ENDIF in /web/htdocs/www.mialchemilla.it/home/wp-content/themes/atahualpa/header.php on line 888
its now show.
in that line 888 there is
<?php endif; ?>
what' wrong?

juggledad Jun 16, 2009 06:29 AM

About the issue of having to scroll to see the sidebars, What is you screen resolution set to? You have set the layout to 1200 and the sidebars to 200 each so the center (which is the main column) is 800 px
If your screen resolution is anything less than 1200 px width, you will get the scroll bar

I also noticed you have a
HTML Code:

div#text-405265421 {
margin-top: 350px;
}

that is a large top margin.

mukundguruji Jul 2, 2009 11:22 AM

Thank you for this great theme Flynn. I have moved my left sidebar to right by following your instructions. Please see the same implemented at http://pallipravan.com (if this amounts to spamming, please remove this link. My site at its inception stage and I have not placed any add etc. on it that may benefit me. So not spamming, OK)

Flynn Jul 2, 2009 05:42 PM

Forum members post URL's all the time, there's no problem with that. You can also post your site here http://forum.bytesforall.com/showthread.php?t=95

mukundguruji Jul 3, 2009 08:03 PM

:)Surely Flynn, I wish to and I will donate. There is no facility in India to add fund to Paypal using one's bank account, and I have no credit card with me. Is there any other way I can pay? With appreciation and regards to all your efforts for the budding online novices like me, Thank You Flynn!

Flynn Jul 3, 2009 08:28 PM

What payment method would work for you, or is popular in India?

evripidis Jul 6, 2009 02:24 PM

Mmm , where is the option for 2 sidebars on one side? I can't find it.

I'm playing around with the Right - Left Inners but i can't make it work.

Am i missing something ?

:confused:

evripidis Jul 6, 2009 02:50 PM

False alarm. I figure it out :)

liabelle Jul 11, 2009 06:35 AM

Hello there,

Evripidis wrote on May 9, 2009, 03:44 AM (and confirmed by Flynn) about the code-solution for moving sidebars to one side (I believe it's for Atahualpa 3.3.3).

My question is: does it also work for Atahualpa 3.4.1? (I see that there are a lot of code-changes on this newst version)

Thanks!! ....

Flynn Jul 11, 2009 10:31 AM

You shouldn't need these code changes anymore, it is a theme option now


All times are GMT -6. The time now is 05:16 AM.

Powered by vBulletin® Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.