Support » Plugin: BuddyPress Links » Sidebar on Links Page gets moved down

Viewing 7 replies - 1 through 7 (of 7 total)
  • valuser

    (@valuser)

    This MAY work !

    In the file http://yoursite.com/wp-content/plugins/buddypress-links/themes/bp-links-default/index.php

    Replace what comes after

    <?php do_action( 'bp_after_directory_links_content' ) ?>

    i.e. from line 49 to the end with the following.

    <?php
    	if ( current_theme_supports( 'buddypress' ) ):
    		// close old containers ?>
    	</div><!-- .padder -->
    	</div><!-- #content -->
    		<?php
    		get_sidebar( 'buddypress' );
    		get_footer( 'buddypress' );
    	else:
    		// close legacy container ?>
    		</div><?php
    	endif;
    ?>

    Basicially moving the divs to put the sidebar back inside the “container” for themes availing of the new buddypress compatibility.

    Well that’s the idea – does it work for you ?

    mucus

    (@mucus)

    I have limited knowledge of coding, so it kind of worked, but is not in the sidebar position, more stuck into the right side of the page starting right at the top right (outside the theme layout).

    I did this, can you advise me on what I’ve done wrong?

    <?php do_action( 'bp_before_directory_links_content' ) ?>
    
    			<?php
            if ( current_theme_supports( 'buddypress' ) ):
                    // close old containers ?>;
            </div><!-- .padder -->
            </div><!-- #content -->
                    <?php
                    get_sidebar( 'buddypress' );
                    get_footer( 'buddypress' );
            else:
                    // close legacy container ?>
                    </div><?php
            endif;
    ?>
    
    			<div class="item-list-tabs" data-links-role="topnav">
    				<ul>
    					<li class="selected" id="links-all"><a href="<?php bp_root_domain() ?>/<?php bp_root_slug( 'links' ) ?>"><?php _e( 'All Links', 'buddypress-links' ) ?> <span><?php echo bp_get_links_total_link_count() ?></span></a></li>
    					<?php do_action( 'bp_links_directory_link_types' ) ?>
    				</ul>
    			</div><!-- .item-list-tabs -->
    
    			<div class="item-list-tabs no-ajax" id="subnav">
    				<ul>
    					<li class="feed"><a href="<?php bp_directory_links_feed_link() ?>" title="RSS Feed"><?php _e( 'RSS', 'buddypress' ) ?></a></li>
    					<?php do_action( 'bp_links_syndication_options' ) ?>
    					<?php do_action( 'bp_links_item_list_tabs' ) ?>
    				</ul>
    			</div><!-- .item-list-tabs -->
    
    			<div id="links-dir-list" class="links dir-list">
    				<?php bp_links_locate_template( array( 'links-loop.php' ), true ) ?>
    			</div><!-- #links-dir-list -->
    
    			<?php do_action( 'bp_directory_links_content' ) ?>
    
    			<?php wp_nonce_field( 'directory_links', '_wpnonce-links-filter' ) ?>
    
    		</form><!-- #links-directory-form -->
    
    		<?php do_action( 'bp_after_directory_links_content' ) ?>
    
    		</div><!-- .padder -->
    	</div><!-- #content -->
    
    <?php
    	if ( current_theme_supports( 'buddypress' ) ):
    		// close old containers ?>
    		<?php
    		get_sidebar( 'buddypress' );
    		get_footer( 'buddypress' );
    	else:
    		// close legacy container ?>
    		</div><?php
    	endif;
    ?>
    valuser

    (@valuser)

    Ok – i also am very limited as regards coding!!!!

    But my post above is as follows (emphasis on the differences)

    Replace what comes after

    <?php do_action( ‘bp_after_directory_links_content’ ) ?>

    i.e. from line 49 to the end with the following.

    All I can attest to is the above – the change is at the end of the file from line 49 onwards

    Hope this helped.

    mucus

    (@mucus)

    YOU BEAUTY!! You fixed it, thank you so much my friend!!!!

    Josh Rosenau

    (@kadymahinder)

    Hi –

    Just wanted to say thanks to valuser and mucus for their fine work defining a problem, cooperating and solving that problem.

    So for anyone else having difficulty, just replace the code in http://yoursite.com/wp-content/plugins/buddypress-links/themes/bp-links-default/index.php with this:

    <?php
    	if ( current_theme_supports( 'buddypress' ) ):
    		get_header( 'buddypress' );
    		// spit out old containers ?>
    		<div id="content">
    			<div class="padder"><?php
    	else:
    		// spit out legacy container ?>
    		<div id="buddypress"><?php
    	endif;
    ?>
    
    		<form action="" method="post" id="links-directory-form" class="dir-form">
    
    			<h3><?php _e( 'Links Directory', 'buddypress-links' ) ?><?php if ( is_user_logged_in() ) : ?> &nbsp;<a class="button" href="<?php echo bp_get_root_domain() . '/' . bp_links_root_slug() . '/create/' ?>"><?php _e( 'Create a Link', 'buddypress-links' ) ?></a><?php endif; ?></h3>
    
    			<?php do_action( 'bp_before_directory_links_content' ) ?>
    
    			<div id="link-dir-search" class="dir-search">
    				<?php bp_links_dtheme_search_form() ?>
    			</div><!-- #link-dir-search -->
    
    			<div class="item-list-tabs" data-links-role="topnav">
    				<ul>
    					<li class="selected" id="links-all"><a href="<?php bp_root_domain() ?>/<?php bp_root_slug( 'links' ) ?>"><?php _e( 'All Links', 'buddypress-links' ) ?> <span><?php echo bp_get_links_total_link_count() ?></span></a></li>
    					<?php do_action( 'bp_links_directory_link_types' ) ?>
    				</ul>
    			</div><!-- .item-list-tabs -->
    
    			<div class="item-list-tabs no-ajax" id="subnav">
    				<ul>
    					<li class="feed"><a href="<?php bp_directory_links_feed_link() ?>" title="RSS Feed"><?php _e( 'RSS', 'buddypress' ) ?></a></li>
    					<?php do_action( 'bp_links_syndication_options' ) ?>
    					<?php do_action( 'bp_links_item_list_tabs' ) ?>
    				</ul>
    			</div><!-- .item-list-tabs -->
    
    			<div id="links-dir-list" class="links dir-list">
    				<?php bp_links_locate_template( array( 'links-loop.php' ), true ) ?>
    			</div><!-- #links-dir-list -->
    
    			<?php do_action( 'bp_directory_links_content' ) ?>
    
    			<?php wp_nonce_field( 'directory_links', '_wpnonce-links-filter' ) ?>
    
    		</form><!-- #links-directory-form -->
    
    		<?php do_action( 'bp_after_directory_links_content' ) ?>
    
    		<?php
    	if ( current_theme_supports( 'buddypress' ) ):
    		// close old containers ?>
    	</div><!-- .padder -->
    	</div><!-- #content -->
    		<?php
    		get_sidebar( 'buddypress' );
    		get_footer( 'buddypress' );
    	else:
    		// close legacy container ?>
    		</div><?php
    	endif;
    ?>

    I love you men ! I failed one week and you saved me now !

    Thank you @valuser!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Sidebar on Links Page gets moved down’ is closed to new replies.