WordPress.org

Ready to get started?Download WordPress

Forums

Pink Touch 2
[resolved] [closed] How to move footer widgets to a new sidebar (8 posts)

  1. fionachan
    Member
    Posted 2 years ago #

    Hi, I'm using Pink Touch 2 theme on my blog. I'm trying to move the footer's widgets to a sidebar (that doesn't really exist yet). I moved the blog posts to the left and I want the widgets as a sidebar on the right, but I have no idea how to do it. Any one has any idea?

  2. webnub
    Member
    Posted 2 years ago #

    I am also trying to customize the theme so any help would be grateful.. I guess you have to modify the css and add a sidebar section, an then add another <div class="sidebar">. I am not very experienced in web programming though. The theme does not have a sidebar.php function. If anyone is more experienced it should not be that hard to do

  3. fionachan
    Member
    Posted 2 years ago #

    yeah I was just experiencing and see if it works, not sure how much it the <div class="sidebar"> helps though. A little lazy to remove it.

    Anyway, I downloaded the theme's files and renamed the sidebar-footer.php to sidebar.php, and then I searched in other files to remove footer from the sidebar-footer too. I added <?php get_sidebar(); ?> in the header.php (as the 2nd last line) and in the css I have position: absolute; under widget.

    I have modified the files so many times I can't really keep track of other changes..

  4. webnub
    Member
    Posted 2 years ago #

    It is not that simple. you have to add css elements for the list and the divs, and then check the code to see which div is inside which. I believe it is not correct to modify the header.php file. Maybe we should check this first and then perform any changes. I have made some progress and managed to add a sidebar but I haven't aligned the divs properly. Right now it is just a matter of css. I wrote a new sidebar.php with the following contents:

    if ( is_active_sidebar( 'main-sidebar' ) ) :?>
    <ul id="sidebar-main" class="xoxo widget-area" role="complementary">
        <?php dynamic_sidebar( 'main-sidebar' ); ?>
    </ul>

    You also have to add it to the functions.php

    // This is the main sidebar, next to the posts column.
    register_sidebar( array(
        'name' => __('Main Sidebar', 'candid'),
        'id' => 'main-sidebar',
        'description' => __( 'The sidebar next to the main content', 'candid' ),
    ) );

    You also have to register the css attributes and then I included it in the footer.php (which sucks, it is surely wrong coding style). I haven't figured out the css yet. Hope that helps.

  5. fionachan
    Member
    Posted 2 years ago #

    Actually I just wanted to move the footer area's widget to become my sidebar. I didn't want the footer widget area at all anyway, and I didn't want to "add a new sidebar". Anyway, what I did worked for me so it's okay. :)

  6. latha shreedhar
    Member
    Posted 2 years ago #

    Dear fionachan!!

    I am also struck with the same problem! But I am not able solving it. Can you please give me your pink-touch-customized template folder as a zip.

    Thanks you in advance

  7. andreqz
    Member
    Posted 1 year ago #

    Hey, anyone can help? ;/

    I really want to have a sidebar on this theme

  8. Andrew
    Forum Moderator
    Posted 1 year ago #

    If you create your own thread depicting the issue, you're more likely to receive help.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic