Tagged: code updated
Hi Tosin,
Thank you for the question.
I am, assuming that you are using Ray’s plugin.Please allow me to look into it over the weekend to assist you.
Regards
BrajeshHi Tosin,
Hope you are doing well.
I had a look at the plugin and it does not provide an entry point to disable the ajax.you may try adding this code to see if it works(we are turning of event handler using js)
/** * Disable ajax for follow button */ function tosin_disable_ajax_bp_follow() { ?> <script> (function ($) { let $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'); } })(jQuery); </script> <?php } add_action( 'wp_footer', 'tosin_disable_ajax_bp_follow', 100 );
Regards
Brajesh- This reply was modified 1 year, 9 months ago by Brajesh Singh.
Hi Tosin,
Please use the updated code as there was a minor typo which used an undefined reference.Regards
BrajeshThank you for letting me know.
I haven’t tried testing the code as that would mean I need tome to setup the plugin.I hope you can debug(the logic is to make sure you turn off the click handler) or I will do it when i have sufficient free time.
Regards
Brajesh
You must be logged in to reply to this topic.