Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: How to add login link to “You must be logged in to create new topics.”

@uksentinel

Participant

So as a slight deviation, I managed to resolve how to add a login link to “You must be logged in to reply to this topic.” and not “You must be logged in to create new topics.”.

I use the login plugin (paid) created by Xootix and I asked them for the necessary code (PHP) to add a link to the “You must be logged in to reply to this topic.” or at least enable the wording to be clickable.

Below is PHP code provided by Xootix and I added it to the Themes functions.php and this works very well

add_action( ‘wp_footer’, function(){
if( is_user_logged_in() ) return;
?>

<style type=”text/css”>
.bbp-no-reply .bbp-template-notice{
cursor: pointer;
}
</style>
<script type=”text/javascript”>
jQuery(document).ready(function($){
$(‘body’).on( ‘click’, ‘.bbp-no-reply .bbp-template-notice’, function(){
$(‘.xoo-el-login-tgr’).trigger(‘click’);
} )
})
</script>
<?php
} );

Skip to toolbar