Tagged: code updated
This seemed to work but its not perfect
/** * Disable ajax for follow button */ function disable_ajax_bp_follow() { if ( bp_is_user() && is_user_logged_in() && bp_displayed_user_id() ) { ?> <script type="text/javascript"> jQuery(document).ready(function($) { var itemButtons = null; if ($('body.bp-nouveau').length) { itemButtons = $('ul.member-header-actions'); } else { itemButtons = $('#item-buttons'); } if (itemButtons && itemButtons.length) { itemButtons.off('click', '.follow-button a.follow, .follow-button a.unfollow'); itemButtons.on('click', '.follow-button a.follow, .follow-button a.unfollow', function(event) { event.preventDefault(); location.reload(); }); } }); </script> <?php } } add_action( 'wp_footer', 'disable_ajax_bp_follow', 100 );
Hi Tosin,
Good to know that.I am glad you managed to get it working.
Regards
Brajesh
You must be logged in to reply to this topic.
This topic is: not resolved