Tagged: x
-
AuthorPosts
-
June 21, 2016 at 2:58 pm #1053123
Hello, I’m trying to add a booking engine to the website I’m working on, but then I get some errors on the page.
The code is<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
the error is:
Revolution Slider Error: You have some jquery.js library include that comes after the revolution files js include.
This includes make eliminates the revolution slider libraries, and make it not work.To fix it you can:
1. In the Slider Settings -> Troubleshooting set option: Put JS Includes To Body option to true.
2. Find the double jquery.js include and remove it.As you can see on the attached file I added this code on the functions.php file on my child theme:
function my_custom_head_output() { ?> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> <script type="text/javascript" src="globalize/globalize-it.js"></script> <?php }
add_action( ‘wp_head’, ‘my_custom_head_output’ );
I need help please…
June 21, 2016 at 4:43 pm #1053270Hi there,
Thanks for writing in! jQuery libraries are already included to the theme and you don’t need to add it again.
Hope that’s clear.
June 22, 2016 at 2:09 am #1053865ok, I was trying not to add those but the calendar datepicker doesn’t work. Any advice?
June 22, 2016 at 5:58 am #1054113Hi There,
Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL so we can check the errors on the console. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
June 22, 2016 at 9:09 am #1054353This reply has been marked as private.June 22, 2016 at 10:51 am #1054523also see this… it’s what I’ve added on my _header.php file (child theme)
it is correct?
June 22, 2016 at 10:52 am #1054526here is the code
<?php // ============================================================================= // VIEWS/GLOBAL/_HEADER.PHP // ----------------------------------------------------------------------------- // Declares the DOCTYPE for the site and includes the <head>. // ============================================================================= ?> <!DOCTYPE html> <!--[if IE 9]><html class="no-js ie9" <?php language_attributes(); ?>><![endif]--> <!--[if gt IE 9]><!--><html class="no-js" <?php language_attributes(); ?>><!--<![endif]--> <head> <?php wp_head(); ?> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> <link rel="stylesheet" href="http://hotelcrosal.creativaimage.it/wp-content/themes/x-child/horizontal-bookingexpert.css" /> </head> <body <?php body_class(); ?>> <?php do_action( 'x_before_site_begin' ); ?> <div id="top" class="site"> <?php do_action( 'x_after_site_begin' ); ?>
I needed to add
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> <link rel="stylesheet" href="http://hotelcrosal.creativaimage.it/wp-content/themes/x-child/horizontal-bookingexpert.css" />
in the head
June 22, 2016 at 4:43 pm #1055154Hi There,
Add this on your Child theme’s functions.php file instead.
function enqueue_style() { wp_enqueue_style( 'smoothness', 'http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css' ); wp_enqueue_style( 'horizontal-bookingexpert', 'http://hotelcrosal.creativaimage.it/wp-content/themes/x-child/horizontal-bookingexpert.css' ); } add_action( 'wp_enqueue_scripts', 'enqueue_style' );
Hope it helps, Cheers!
June 23, 2016 at 2:45 am #1055914nothing changes 🙁
these are the complete instructions from bookingexpert:`<head>
<link rel=”stylesheet” href=”http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css” />
<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js”></script>
<script src=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js”></script>
<script type=”text/javascript” src=”http://hotelcrosal.creativaimage.it/wp-content/themes/x-child/globalize/globalize-it.js”></script>
<link rel=”stylesheet” href=”http://hotelcrosal.creativaimage.it/wp-content/themes/x-child/horizontal.css” /></head>
<body>
<div id=”bookingexpert”>
<div id=”searchbox”></div>
</div><script src=”https://be.bookingexpert.it/book/websites/searchbox?hotel=15008&lang=it”></script>
<script>it.bookingexpert.SearchBox.load(‘searchbox’, ‘Default’);</script></body>`
and this is how look my functions.php file:
function my_custom_head_output() { ?> <script type="text/javascript" src="http://hotelcrosal.creativaimage.it/wp-content/themes/x-child/globalize/globalize-it.js"></script> <?php } add_action( 'wp_head', 'my_custom_head_output' ); function enqueue_style() { wp_enqueue_style( 'smoothness', 'http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css' ); wp_enqueue_style( 'horizontal-bookingexpert', 'http://hotelcrosal.creativaimage.it/wp-content/themes/x-child/horizontal-bookingexpert.css' ); } add_action( 'wp_enqueue_scripts', 'enqueue_style' );
Where I’m wrong?
June 23, 2016 at 5:12 am #1056056Hello There,
To properly load the jQuery and jQuery Ui, please insert this following code in your child theme’s functions.php file.
function my_add_frontend_scripts() { wp_enqueue_script( 'globalize-it', get_stylesheet_directory_uri() . '/globalize/globalize-it.js', array(), '1.0.0', false ); wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_style( 'smoothness', 'http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css' ); wp_enqueue_style( 'horizontal-bookingexpert', get_stylesheet_directory_uri() . '/horizontal-bookingexpert.css' ); } add_action('wp_enqueue_scripts', 'my_add_frontend_scripts');
We would loved to know if this has work for you. Thank you.
June 23, 2016 at 5:48 am #1056099thank you guys but it does not work… no datepicker here…
any advice?June 23, 2016 at 7:13 am #1056209this is how look my functions.php file:
<?php // ============================================================================= // FUNCTIONS.PHP // ----------------------------------------------------------------------------- // Overwrite or add your own custom functions to X in this file. // ============================================================================= // ============================================================================= // TABLE OF CONTENTS // ----------------------------------------------------------------------------- // 01. Enqueue Parent Stylesheet // 02. Additional Functions // ============================================================================= // Enqueue Parent Stylesheet // ============================================================================= add_filter( 'x_enqueue_parent_stylesheet', '__return_true' ); // Additional Functions // ============================================================================= add_filter( 'wpcf7_support_html5_fallback', '__return_true' ); function my_add_frontend_scripts() { wp_enqueue_script( 'globalize-it', get_stylesheet_directory_uri() . '/globalize/globalize-it.js', array(), '1.0.0', false ); wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_style( 'smoothness', 'http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css' ); wp_enqueue_style( 'horizontal-bookingexpert', get_stylesheet_directory_uri() . '/horizontal-bookingexpert.css' ); } add_action('wp_enqueue_scripts', 'my_add_frontend_scripts');
In the homepage I added a raw content with this inside:
<div id="bookingexpert"> <div id="searchbox"></div> </div> <script src="https://be.bookingexpert.it/book/websites/searchbox?hotel=15008&lang=it"></script> <script>it.bookingexpert.SearchBox.load('searchbox', 'Default');</script>
June 23, 2016 at 7:54 am #1056249Hi,
It sounds like you might be having an issue with a third party plugin or script. Regretfully, we cannot provide support for third party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.
Thank you for your understanding.
June 23, 2016 at 8:21 am #1056282It isn’t so. As you can see here http://hotelcrosal.creativaimage.it/booking/widget-ricerca.html the widget works great. If I add the code as they tell me to do Revolution Slider stop to work and the widget is not shown on the page. So I think is wrong the way you tell me to add the codes.
Please…
June 23, 2016 at 8:50 am #1056328I asked to the developer, he wants to know the variable with which you initialize all javascript functions (for example, if you use the $ or jQuery).
-
AuthorPosts