Jump to content

Archived

This topic is now archived and is closed to further replies.

rmaxsg

Sticky Ubermenu and Pagelines DMS

Recommended Posts

rmaxsg

Hi @bfrye,

What is happening is that the DMS is loading its own version of Waypoints, which overrides UberMenu’s version, which causes a javascript error.

I dug around in PageLines DMS and found that this is the issue: they are enqueueing scripts against the wrong hook:

1
2
3
4
5
6
7
8
9
10
11
12
add_action( 'wp_print_scripts', 'pagelines_print_js' );
function pagelines_print_js() {
 
    wp_enqueue_script( 'pagelines-bootstrap-all' );
    wp_enqueue_script( 'pagelines-easing' );
    wp_enqueue_script( 'pagelines-resizer' );
    wp_enqueue_script( 'pagelines-viewport' );
    wp_enqueue_script( 'pagelines-waypoints' );
    wp_enqueue_script( 'pagelines-fitvids' );
    wp_enqueue_script( 'pagelines-parallax' );
    wp_enqueue_script( 'pagelines-common' );
}

Changing line 142 in actions.site.php to the proper hook:

1
add_action( 'wp_enqueue_scripts', 'pagelines_print_js' );

resolves the issue.

As described in the WordPress Codex,

 

 

This is one of post by Customer Service Forum. 

 

How you should do this? Should i go in Function.php Edit DMS core file? Please explain in detail. Thank you 

Share this post


Link to post
Share on other sites
Rob

Editing core files violates your license and support.

 

You'd download the PageLines Customize plugin, which contains a functions.php file, and allows you to apply hooks, safely, without harming the core files and without risk of overwriting on the next DMS update.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
rmaxsg

thank you smart egg. The thing is i no as smart as you, smart egg. i have never being use hooks before, As i say, i destroy two of my site 2 weeks ago.  can someone explain me a little more detail? :D

Share this post


Link to post
Share on other sites

×