Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Register new widget area for this child theme.
- *
- * @since My Child Theme Name (1.0)
- */
- function mychildtheme_widget_area() {
- register_sidebar( array(
- 'name' => 'Before Login',
- 'id' => 'before-login',
- 'description' => 'Widget Area Before Login',
- 'before_widget' => '<div id="%1$s" class="widget %2$s">',
- 'after_widget' => '</div>',
- 'before_title' => '<h3 class="widgettitle">',
- 'after_title' => '</h3>'
- ) );
- }
- add_action( 'widgets_init', 'mychildtheme_widget_area' );
- /**
- * Insert widget area above sidebar login area.
- *
- * @since My Child Theme Name (1.0)
- */
- function mychildtheme_insert_before_login() {
- ?>
- <?php if ( is_active_sidebar( 'before-login' ) ) : ?>
- <?php dynamic_sidebar( 'before-login' ); ?>
- <?php endif; ?>
- <?php
- }
- add_action( 'bp_inside_before_sidebar', 'mychildtheme_insert_before_login' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement