Hello, I would like to add content in all units that are free when accessed by non logged in user..
What is the hook to do that ?
I should do something like that ?
add_filter('wplms_before_title_unit ','before_Unit');
function before_Unit(){
if ( !is_user_logged_in() )
{
echo "xxxxxxxxxxxxxxxxxxxx";
}
thanks in advance
}
before_unit
hi,
you have no need to write any code for this!
"free unit" you just need to enable this setting in unit after enabling this free unit setting in unit section everyone on your site enable to check the units in the course.
Hello thanks for your message, but you don't undestand what I mean..
I would like to know if there is a hook to add some content in all unit ?
So I can add some content to all my free unit at once in my function.php please ?
thanks in advance
we have wplms_after_every_unit if you find it in the code you will get it.
the hook that you mentioned above in is to print the things before the title not after the unit.