WordPress.org

Ready to get started?Download WordPress

Forums

How do i add a page wide footer to buddypress default child theme (7 posts)

  1. mattyn1990
    Member
    Posted 1 year ago #

    Hi there

    i'm currently making a default buddypress theme from the default BP them file.

    Im wanting to add a footer that can accept widgets and where i can add a copy right state to. I want the footer to be as wide as the rest of the content areas including the side bars.

    Can anyone please give me some help on this

    my website is http://www.driftedmass.co.uk

  2. mattyn1990
    Member
    Posted 1 year ago #

    This is the code i have got so far (i copied this from the parent file BP-default)

    </div> <!-- #container -->

    <?php do_action( 'bp_after_container' ); ?>
    <?php do_action( 'bp_before_footer' ); ?>

    <div id="footer">
    <?php if ( is_active_sidebar( 'first-footer-widget-area' ) || is_active_sidebar( 'second-footer-widget-area' ) || is_active_sidebar( 'third-footer-widget-area' ) || is_active_sidebar( 'fourth-footer-widget-area' ) ) : ?>
    <div id="footer-widgets">
    <?php get_sidebar( 'footer' ); ?>
    </div>
    <?php endif; ?>

    <div id="site-generator" role="contentinfo">
    <?php do_action( 'bp_dtheme_credits' ); ?>
    <p><?php printf( __( 'Copyright © 2013 DriftedMass.co.uk | All Rights Reserved'),?></p>
    </div>

    <?php do_action( 'bp_footer' ); ?>

    </div><!-- #footer -->

    <?php do_action( 'bp_after_footer' ); ?>

    <?php wp_footer(); ?>

    </body>

    </html>

    How do i edit this to give me one footer area where the text will show and where i can also add widgets?

    Do i have to make changes or create any other files to go alongside this for it to work properly?

  3. @mercime
    Volunteer Moderator
    Posted 1 year ago #

    @mattyn1990 BP Default theme has four footer widget areas by default which span the width of the page. Per code above, the widget areas will show up only when you add a widget to the widget area. Go to Appearance > Widgets and start adding widgets.

  4. mattyn1990
    Member
    Posted 1 year ago #

    ok i guessed it had four dont think i worded it correctly. What im wanting to do is turn all four widget areas into one big area and then remove the prowdly powered by wordpress & buddypress at the bootom of the page.

    Any ideas on what code i would have top use and what files i would have to change or add?

  5. @mercime
    Volunteer Moderator
    Posted 1 year ago #

    @mattyn1990 copy footer.php and sidebar-footer.php files from the BuddyPress Default Theme into your BP default child theme folder.

    A. footer.php

    - open it up with a text editor
    change
    <?php if ( is_active_sidebar( 'first-footer-widget-area' ) || is_active_sidebar( 'second-footer-widget-area' ) || is_active_sidebar( 'third-footer-widget-area' ) || is_active_sidebar( 'fourth-footer-widget-area' ) ) : ?>

    to
    <?php if ( is_active_sidebar( 'first-footer-widget-area' ) ) : ?>

    B. sidebar-footer.php

    - open it up with a text editor. Delete everything. Replace with code in http://pastebin.com/Nqza5uKA

    C. Add the following to your child theme's style.css file

    #footer-widget-area div.widget-area > ul {
    float: none !important;
    margin-right: 0 !important;
    width: 100% !important;
    }

  6. mattyn1990
    Member
    Posted 1 year ago #

    @mercime i done everything that you said above, i went into the appearance > widgets area of wordpress and it still said i had 4 widgets.

    in my child theme folder i gave these folders:
    activity
    blogs
    forum
    groups
    images
    members

    and these files
    custom.css
    footer.php
    functions.php
    index.php
    leftsidebar.php
    page.php
    screenshot.png
    sidebar-footer.php
    single.php
    style.css

    the leftsidebar is controlling the left hand side bar that has now been added to the theme.

    sorry if im being a pain this is just doing my head in and i could not for the life of me figure it out. I had an old theme on and that had only 1 widget area for the whole of the footer but i changed to this one because i liked the look of it better (starting to wish i didnt now)

    if i was to start all over again from BF-default file and create the child theme from scratch what files would i need to take over with me ? (i had someone else make this one, not very good)

  7. @mercime
    Volunteer Moderator
    Posted 1 year ago #

    i went into the appearance > widgets area of wordpress and it still said i had 4 widgets.

    @mattyn1990 Of course, BP Default registered 4 widget areas in the footer. You only need to use the first footer widget area since we made it one widget area only in the footer. No worries.

    if i was to start all over again from BF-default file and create the child theme from scratch what files would i need to take over with me ?

    To create a three-column child theme of BP Default theme with one footer widget area like you wanted, you would definitely try to avoid bringing over template files from the BP Default over to the child theme as much as possible.

    Therefore, you'd start only with
    a) your child theme's style.css
    b) your child theme's blank functions.php
    c) a new file sidebar-second.php and
    d) BP Default theme's footer.php which you need to revise per your one widget-area only in footer
    e) BP Default theme's sidebar-footer.php which you need to revise per your one widget-area only in footer

    You can call the 2nd, 3rd and/or 4th footer widget area/s in sidebar-second.php. You'd need to override the style (width, padding, margin) for the 2/3/4th footer widget areas set by BP Default theme.

    You need to create a function in functions.php file to insert sidebar-second.php file into the body of the theme. And then comes the part where you'd have to use your CSS skills to align the new sidebar.

Topic Closed

This topic has been closed to new replies.

About this Topic