Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #16615

    Hi, I’m using a PrivateContent plugin, ( http://codecanyon.net/item/privatecontent-multilevel-content-plugin/1467885 )

    And I’m having some issues with it. I have anew form provide for the plugin that doesnt work, doesn’t update the form

    I asked the developer por support anh his answer was:

    “1- the registration page has jQuery enqueued after the PrivateContent javascript files. It must be used always as first.”

    “Jquery must be loaded by your theme. My plugin uses the wp_head() hook to enqueue the scripts. You should search for the code that enqueue jQuery and set it to be enqueued as first. “

    I don’t know how to do the jquey thing that he told me to search. It’s possible if you can guide me with this?

    Thanks

    DM

    #92210

    Hi,

    I’m not sure if this is going to work. You can open header.php and find this code

    /* add javascript */
    wp_enqueue_script( 'jquery' );
    wp_enqueue_script( 'avia-default' );
    wp_enqueue_script( 'avia-prettyPhoto' );
    wp_enqueue_script( 'avia-html5-video' );

    Maybe you can add the hook for the plugin above or within this code. Something like this

    /* add javascript */
    wp_enqueue_script( 'NEW-PLUGIN' );
    wp_enqueue_script( 'jquery' );
    wp_enqueue_script( 'avia-default' );
    wp_enqueue_script( 'avia-prettyPhoto' );
    wp_enqueue_script( 'avia-html5-video' );

    Then open functions.php and find this code

    if(!function_exists('avia_frontend_js'))
    {
    function avia_frontend_js()
    {
    wp_register_script( 'avia-default', AVIA_BASE_URL.'js/avia.js', array('jquery','avia-html5-video'), 1, false );
    wp_register_script( 'avia-prettyPhoto', AVIA_BASE_URL.'js/prettyPhoto/js/jquery.prettyPhoto.js', 'jquery', "3.0.1", false);
    wp_register_script( 'avia-html5-video', AVIA_BASE_URL.'js/projekktor/projekktor.min.js', 'jquery', "1", false);

    }
    }

    Add wp_register_script for the plugin js files

    if(!function_exists('avia_frontend_js'))
    {
    function avia_frontend_js()
    {
    wp_register_script( 'NEW-PLUGIN', AVIA_BASE_URL.'js/NEW-PLUGIN.js', 'jquery', "3.0.1", false);
    wp_register_script( 'avia-default', AVIA_BASE_URL.'js/avia.js', array('jquery','avia-html5-video'), 1, false );
    wp_register_script( 'avia-prettyPhoto', AVIA_BASE_URL.'js/prettyPhoto/js/jquery.prettyPhoto.js', 'jquery', "3.0.1", false);
    wp_register_script( 'avia-html5-video', AVIA_BASE_URL.'js/projekktor/projekktor.min.js', 'jquery', "1", false);

    }
    }

    You can change this ‘AVIA_BASE_URL.’js/NEW-PLUGIN.js’ to the url of the js file for the plugin.

    Regards,

    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Jquery problems with a PrivateContent – Multilevel Content Plugin’ is closed to new replies.