WordPress.org

Forums

BuddyPress Links
[resolved] Sidebar on Links Page gets moved down (8 posts)

  1. mucus
    Member
    Posted 1 year ago #

    Hi, I'm having this problem too, I've tried removing the </div></div> section in the theme index.php page. but nothing. I'm using the latest updates for the Links plugin, BP and WP

    https://wordpress.org/plugins/buddypress-links/

  2. valuser
    Member
    Posted 1 year ago #

    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 ?

  3. mucus
    Member
    Posted 1 year ago #

    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;
    ?>
  4. valuser
    Member
    Posted 1 year ago #

    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.

  5. mucus
    Member
    Posted 1 year ago #

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

  6. Josh Rosenau
    Member
    Posted 1 year ago #

    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;
    ?>
  7. damien9m
    Member
    Posted 7 months ago #

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

  8. happyecho
    Member
    Posted 6 months ago #

    Thank you @valuser!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BuddyPress Links
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic