Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #940650

    Dear customer support
    I have make a domain with the Enfold theme its the http://www.santomargarita.gr
    We are appartment…
    So we have to set up the Book Engine it is the cosmores and they gave us a txt file that we should paste it between
    the head tags the first and in the body tags the second. We also must have the libraries jquery and jqueryui…
    Thats the first question..
    And the second is how to update the Enfold theme to the last version without loosing my files.

    Thanks in advance.

    #941121

    Hey soularas,

    To insert code to head meta please use a plugin like https://wordpress.org/plugins/head-meta-data/

    Or copy the header.php file from enfold folder and install it in the child theme.

    TO add the code in the body you can use the code block element.

    jQuery is already added in wordpress please enqueue the js script.

    Also check https://developer.wordpress.org/reference/functions/wp_enqueue_script/

    You can update enfold theme from Enfold > Theme Update

    Check out more ways to update the theme.

    Best regards,
    Vinay

    #942822
    This reply has been marked as private.
    #943949

    Hi,

    Thank you for the update.

    First you must register or enqueue the scripts and stylesheets. Add this code in the functions.php file.

    function ava_enqueue_style() {
    	wp_enqueue_style( 'cosmores-smoothness', 'http://www.cosmores.com/plugins/css/smoothness/jquery-ui-1.8.13.custom.css', false ); 
    }
    
    function ava_enqueue_script() {
    	$theme = wp_get_theme();
    	$vn = $theme->get( 'Version' );
    
    	wp_enqueue_script( 'jquery-ui-core' );
    	wp_enqueue_script( 'cosmores-booking', 'http://www.cosmores.com/plugins/js/cosmoresbooking.search.plugin.js', array('jquery', 'jquery-ui-core'), $vn, false ); 	
    }
    
    add_action( 'wp_enqueue_scripts', 'ava_enqueue_style' );
    add_action( 'wp_enqueue_scripts', 'ava_enqueue_script' );
    

    Place the jQuery script along with the form markup in a code or text block.

    
    <script type="text/javascript">	jQuery(document).ready(function(){ jQuery(“#frmSearchCosmoresBooking").cosmoresbooking({“hotelUrl":"https://santomargarita.cosmores.com","numberOfMonths":1,"siteId":1440,"firstDay":0,"dateFormat":"dd.mm.yy","showToday":true,"checkInDateFailureMessage":"Check-in date field is required","checkInDateName":"check_in_date_cosmores","checkOutDateFailureMessage":"Check-out date field is required","checkOutDateName":"check_out_date_cosmores","checkOutMinDate":1,"adultsName":"adults_cosmores","roomsName":"rooms_cosmores","childrenName":"children_cosmores","buttonName":"button_cosmores","childrenCancelText":"Cancel","childrenOKText":"OK" ,"childrenText":"Child","childrenHeaderText":"Age(s) of children.","openNewWindow":0,"enableDays":[]});	});</script>
    
    <form name="frmSearchCosmoresBooking" id="frmSearchCosmoresBooking" method="get" target="_blank"><input type="hidden" name="lan_cosmores" id="lan_cosmores" value="en" /><label for="check_in_date_cosmores">Check-in:</label><input type="text" name="check_in_date_cosmores" id="check_in_date_cosmores" value="02.04.2018" />
    <label for="check_out_date_cosmores">Check-out:</label><input type="text" name="check_out_date_cosmores" id="check_out_date_cosmores" value="03.04.2018" />
    <label for="rooms_cosmores">Rooms:</label><select name="rooms_cosmores" id="rooms_cosmores">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    </select>
    <label for="adults_cosmores" >Adults:</label>	<select name="adults_cosmores" id="adults_cosmores">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    </select>
    <input type="submit" id="button_cosmores" name="button_cosmores" value="Search" /></form>
    

    i also dont know how to use the block element…

    Edit the page and then switch to the advance layout builder. You should see the Code Block element under the Content Elements panel.

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.