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=14409)

sanguango May 29, 2011 10:09 PM

[SOLVED] Move sidebars to one side?
 
Hello guys, I want to move my left sidebar to the rigth, so I can have both sidebars together (=> center column, left sibebar, right sidebar).

There is a thread with the same title/question in this forum but the answer provided there did not work in my case. The code cited there is different from the one I have. I would therefore appreciate if you can give me a hand with this. I am using Atahualpa 3.6.7 and I have this code:

Code in header.php:
Code:

                <?php if ( $left_col == "on" ) { ?>

                <!-- Left Sidebar -->

                <td id="left">



                        <?php // Widgetize the Left Sidebar

                        if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Left Sidebar') ) : ?>

               

                                <div class="widget widget_categories"><div class="widget-title">

                                <h3><?php _e('Categories','atahualpa'); ?></h3>

                                </div>

                                <ul><?php wp_list_categories('show_count=1&title_li='); ?></ul>

                                </div>

                               

                                <div class="widget widget_archive"><div class="widget-title">

                                <h3><?php _e('Archives','atahualpa'); ?></h3>

                                </div>

                                <ul><?php wp_get_archives('type=monthly'); ?></ul>

                                </div>



                                <div class="widget widget_text"><div class="widget-title">

                                <h3>A sample text widget</h3></div>

                                <div class="textwidget">

                                <p>Etiam pulvinar consectetur dolor sed malesuada. Ut convallis

                                <a href="http://wordpress.org/">euismod dolor nec</a> pretium. Nunc ut tristique massa. </p>

                                <p>Nam sodales mi vitae dolor <em>ullamcorper et vulputate enim accumsan</em>.

                                Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. <strong>Nulla nulla lorem</strong>,

                                suscipit in posuere in, interdum non magna. </p>

                                </div>

                               

                        <?php endif; ?>



                </td>

                <!-- / Left Sidebar -->

                <?php } ?>



                <?php if ( $left_col2 == "on" ) { ?>

                <!-- Left INNER Sidebar -->

                <td id="left-inner">



                        <?php // Widgetize the Left Inner Sidebar

                        if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Left Inner Sidebar') ) : ?>

               

                                        <!-- no default content for the LEFT INNER sidebar -->

                                                                       

                        <?php endif; ?>



                </td>

                <!-- / Left INNER Sidebar -->

                <?php } ?>

and

Code:

<colgroup>

<?php if ( $left_col == "on" ) { ?><col class="colone" /><?php } ?>

<?php if ( $left_col2 == "on" ) { ?><col class="colone-inner" /><?php } ?>

<col class="coltwo" />

<?php if ( $right_col2 == "on" ) { ?><col class="colthree-inner" /><?php } ?>

<?php if ( $right_col == "on" ) { ?><col class="colthree" /><?php } ?>

</colgroup>

Code in footer.php:

Code:


<!-- Right Inner Sidebar -->

<?php if ( $right_col2 == "on" ) { ?>

<td id="right-inner">



        <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Right Inner Sidebar') ) : ?>



                <div class="widget widget_categories"><div class="widget-title">

                <h3><?php _e('Categories','atahualpa'); ?></h3>

                </div>

                <ul><?php wp_list_categories('show_count=1&title_li='); ?></ul>

                </div>

               

                <div class="widget widget_archive"><div class="widget-title">

                <h3><?php _e('Archives','atahualpa'); ?></h3>

                </div>

                <ul><?php wp_get_archives('type=monthly'); ?></ul>

                </div>



                <div class="widget widget_text"><div class="widget-title">

                <h3>A sample text widget</h3></div>

                <div class="textwidget">

                <p>Etiam pulvinar consectetur dolor sed malesuada. Ut convallis

                <a href="http://wordpress.org/">euismod dolor nec</a> pretium. Nunc ut tristique massa. </p>

                <p>Nam sodales mi vitae dolor <em>ullamcorper et vulputate enim accumsan</em>.

                Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. <strong>Nulla nulla lorem</strong>,

                suscipit in posuere in, interdum non magna. </p>

                </div>

       

        <?php endif; ?>



</td>

<?php } ?>



<!-- Right Sidebar -->

<?php if ( $right_col == "on" ) { ?>

<td id="right">



        <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Right Sidebar') ) : ?>

       

                <!-- Default content here -->

            <div class="widget"><div class="widget-title"><h3>Recent Posts</h3></div>

                        <?php $r = new WP_Query(array(

                                'showposts' => 20,

                                'what_to_show' => 'posts',

                                'nopaging' => 0,

                                'post_status' => 'publish',

                                'ignore_sticky_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 id="linkcat-99" class="widget widget_links"><div class="widget-title">

            <?php wp_list_bookmarks('category_before=&category_after=&title_before=<h3>&title_after=</h3></div>'); ?>

            </div>



            <div class="widget"><div class="widget-title">

            <h3><?php _e('Meta','atahualpa'); ?></h3>

            </div>

            <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>



        <?php endif; ?>



</td>

<?php } ?>

<!-- / Right Sidebar -->

Thank you very much

juggledad May 30, 2011 03:40 AM

Why not go to ato-> style & edit sidebars and turn on the right inner sidebar and turn off the left sidebar. Then put your widgets in the right and right inner sidebars

sanguango May 30, 2011 04:58 PM

Thank you! Much easier!


All times are GMT -6. The time now is 01:17 AM.

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