[Support request] edit function.php

Home Forums Support [Support request] edit function.php

Home Forums Support edit function.php

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

    Gentlemen, good morning …

    I’m using google translate to communicate, I hope my request for help is clear.

    I am not a programmer and so little code entry, but in Internet search I found the code below that allows the calendar to be translated into the format and language of my country that is Brazil. I’ve already performed the test by pasting this function’s generate.php code, however when the code is updated and deleted.
    I would like to know if there is any way this code will not be deleted when the theme is updated.
    I use the Elementor …
    This code needs to be edited so that the page where the calendar to be translated is informed.

    Here’s the code:
    add_action(‘wp_footer’, function () {
    if ( ! is_page( 1024 ) ) {
    jQuery( document ).ready( function( $ ){
    function waitForFlatpicker( callback ) {
    if ( typeof window.flatpickr !== ‘function’ ) {
    setTimeout( function() { waitForFlatpicker( callback ) }, 2 );
    waitForFlatpicker( function(){
    flatpickr.l10ns.pt = {
    weekdays: {
    shorthand: [“Dom”, “Seg”, “Ter”, “Qua”, “Qui”, “Sex”, “Sáb”],
    longhand: [
    months: {
    shorthand: [
    longhand: [
    rangeSeparator: ” até “,
    //set translations
    //set format
    setTimeout( function(){
    $(‘.elementor-date-field’).each(function(){ flatpickr( $(this)[0] ).set(‘dateFormat’, ‘d/m/Y’);});
    }, 1000 );
    } );

    Customer Support

    Hi there,

    i did reply directly to your email – this article explains how to add PHP:


    The Code Snippets plugin that the article mentions is the easiest method.

    If you wish to use a child theme then you can read about that here:


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