changing label names

Home Forums Calendar Products Events Calendar PRO changing label names

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #996417
    John Paul
    Participant

    Custom Wording in the Calendar

    Hi , I want to change the titles of things like Tickets and other titles… I tried to use the advice from the link above and I cannot get it to work. I have added it to the top of the functions file and where you see it below…I have also removed the <?php tag but this just broke the site…you will see the code at the bottom…but as I said I also added it to the top just below the php tag
    I am trying not to move to poedit as from previous experiences this can all change back when the plugin is upgraded.
    <?php
    add_action( ‘wp_enqueue_scripts’, ‘imedica_child_enqueue_styles’ );
    function imedica_child_enqueue_styles() {
    wp_enqueue_style( ‘imedica-parent-style’, get_template_directory_uri() . ‘/style.css’ );
    }
    if ( ! defined( ‘IMEDICA_CHILD_VERSION’ ) ) {
    define( ‘IMEDICA_CHILD_VERSION’, ‘1.1’ );
    }
    /*Page loading time optimization*/

    // Remove query strings from urls
    function imedica_remove_query_strings( $src ) {
    $src = remove_query_arg( array( ‘v’, ‘ver’, ‘rev’, ‘bg_color’, ‘sensor’ ), $src );
    return $src;
    }
    add_filter( ‘style_loader_src’, ‘imedica_remove_query_strings’, 10, 2 );
    add_filter( ‘script_loader_src’, ‘imedica_remove_query_strings’, 10, 2 );

    // Defer parsing of JavaScripts
    function imedica_defer_parsing_js( $url ) {
    if ( ! is_admin() ) {
    if ( false === strpos( $url, ‘.js’ ) ) {
    return $url;
    }
    if ( strpos( $url, ‘jquery.js’ ) ) {
    return $url;
    }
    if ( strpos( $url, ‘slick.min.js’ ) ) {
    return $url;
    }
    if ( strpos( $url, ‘custom.js’ ) ) {
    return $url;
    }
    if ( strpos( $url, ‘functions.min.js’ ) ) {
    return $url;
    }
    if ( strpos( $url, ‘jquery.bxslider.min.js’ ) ) {
    return $url;
    }
    return “$url’ defer=’defer”;
    } else {
    return $url;
    }
    }
    add_filter( ‘clean_url’, ‘imedica_defer_parsing_js’, 10, 1 );

    $custom_text = array(
    ‘Related Events’ => ‘Similar Events’,
    ‘Search’ => ‘Find’,
    );

    #996423
    John Paul
    Participant

    hi..

    this isn’t so important now..I managed to change what I need for now in the single-event files….but would be nice to know at some point why this doesnt work

    btw…if I did use POdit..would the changes be overwritten next time EC sends an update> this has happened to me before with a Theme…and I had to update through FTP to ensure changes in POedit stayed in place

    #996464
    George
    Participant

    Hey John,

    I’m sorry you had issues here – it seems that your problem stem from the lack of a function for the text-replacement code you cited. For example, in the bottom of the code you posted, you had this:


    $custom_text = array(
    ‘Related Events’ => ‘Similar Events’,
    ‘Search’ => ‘Find’,
    );

    But that $custom_text variable is not in a function or anything, and not hooked to the gettext replacement functions that are mentioned in that knowledgebase article you linked to at the top of your post. You have to use the complete code example at the bottom of the knowledgebase article, not just the bit of code that is shown in the middle of the article like you are currently using.

    Since you mention having worked things out in some sense despite these issues, and the answer to these specific issues is to just consult that Knowledgebase article with complete thoroughness and read each word carefully, I will close up this ticket for now. However, if you have any other questions or concerns on other topics please don’t hesitate to open a new thread. 🙂

    Cheers!
    George

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘changing label names’ is closed to new replies.