hook in unit ?

Home Forums Legacy Support Support queries Other issues hook in unit ?

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #251760
    StudioLeBus
    Participant
    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
    #252080
    Veronica
    Moderator
    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.
    #253852
    StudioLeBus
    Participant
    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
    #254108
    Veronica
    Moderator
    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.
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘hook in unit ?’ is closed to new replies.