• Resolved zaesar

    (@zaesar)


    Hi,

    I have a course platform where instructors create courses from their dashboard (like author role) I want them to have the option when they are Add New Course page to have option to activate age verification popup for this course.

    Is that possible with this plugin?

    Thank you and congrats for the plugin

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Surbma

    (@surbma)

    Hi @zaesar,

    it is not possible with this plugin. You, as an administrator can manage the settings. You can set it for custom post types also, but not for individual courses.

    But if you have any content, that needs age verification, you should consider enable the popup globally.

    Thread Starter zaesar

    (@zaesar)

    Sad to hear that,

    But that doesn’t help.

    Will look for other options

    Plugin Author Surbma

    (@surbma)

    I hope, you will find a solution! Or maybe a custom development. You can use my plugin as a basic starting point for the development…

    Thread Starter zaesar

    (@zaesar)

    Thank you!

    I added with advanced custom field a checkbox true/ false on the Edit course side. I can create a condition like:

    <?php
    
    if( get_field('age_verificaton') = 1 ) {
        // And here trigger the popup verification code
    }

    Could I add there your code?

    Plugin Author Surbma

    (@surbma)

    Yes, you can modify my code as you like! I think, it should work.

    Thread Starter zaesar

    (@zaesar)

    Is there any shortcode that triggers the popup?

    Could install the plugin and add the shortcode inside the condition above…

    Thread Starter zaesar

    (@zaesar)

    Maybe something like this?

    <?php
        //On single-course template
    
        if( get_field('age_verificaton') = 1 ) { ?>
            <script>
                $.UIkit.modal(('#surbma-yes-no-popup'), {center: true,keyboard: false,bgclose: false}).show();
            </script>
        <?php 
        } ?>
    
    

    Appreciate your time

    • This reply was modified 4 years, 7 months ago by zaesar.
    Plugin Author Surbma

    (@surbma)

    I can not support you on custom modifications, but you are on the right path! ?? You need to test it!

    Thread Starter zaesar

    (@zaesar)

    Thanks man!

    Appreciate your help ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Add option to display age verification on CPT course editor’ is closed to new replies.