Hybrid child-theme on WordPress-Applications not displaying
PostPosted: 01 Feb 2012, 05:21
When installing chat on a WordPress website, one of the requirements are that the jQuery libraries and an extra css file be included in the head and footer of the HTML.
I did this by putting the following code in my Hybrid child theme's functions.php:
I do this to prevent WordPress from including jQuery more than once, since I enabled other plugins also utilising jQuery. This is to prevent any conflicts and malfunctioning.
Chat works fine with this integration method but Applications aren't being displayed on the toolbar. I double-checked the correct instalation and activation.
In Internet Explorer a javascript error occurs in line 2 of the jQuery library. Now I suspect that it is because the version of jQuery differs from the one included in Arrow Chat.
Am I on the right track and how can I fix this?
Thank you!
I did this by putting the following code in my Hybrid child theme's functions.php:
- Code: Select all
function chat_style() {
wp_enqueue_style( 'chat-style', '/arrowchat/external.php?type=css', false, '0.1', 'all' );
}
add_action( 'wp_head', 'chat_style', 1 );
function chat_scripts_enqueue() {
wp_enqueue_script( 'chat-script-1', '/arrowchat/external.php?type=djs', array( 'jquery', 'jquery-ui-core' ), 0.1 );
wp_enqueue_script( 'chat-script-2', '/arrowchat/external.php?type=js', array( 'jquery', 'jquery-ui-core' ), 0.1 );
}
add_action( 'wp_footer', 'chat_scripts_enqueue', 8 );
I do this to prevent WordPress from including jQuery more than once, since I enabled other plugins also utilising jQuery. This is to prevent any conflicts and malfunctioning.
Chat works fine with this integration method but Applications aren't being displayed on the toolbar. I double-checked the correct instalation and activation.
In Internet Explorer a javascript error occurs in line 2 of the jQuery library. Now I suspect that it is because the version of jQuery differs from the one included in Arrow Chat.
Am I on the right track and how can I fix this?
Thank you!