Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1331117
    Iceeyez
    Participant

    Hi

    Tried to add this code that was provided in the forum on changing the suit button for the blog. Installed a child theme and added it to the Child themes php. Now the site is a blank whit page and Im getting a bit stressed as this should be up and running to a customer. Please provide some information on how to take the site back.

    This is the page:
    http://www.styrelseportal.nu

    this made it White:
    function comment_reform ($arg) {
    $arg[‘title_reply’] = __(‘Comment Title goes here’);
    return $arg;
    }
    add_filter(‘comment_form_defaults’,’comment_reform’);

    add_filter(‘gettext’, ‘x_translate_text’ , 20, 3);
    function x_translate_text ( $translated_text, $text, $domain ) {

    $translation = array (
    ‘Submit’ => ‘Button Text’
    );

    if( isset( $translation[$text] ) ) {
    return $translation[$text];
    }

    #1331139
    Iceeyez
    Participant

    Tried to change the blog submit button to another language. And after a round in the forum I only found ideas on changing the server side via a child theme so I went on that scary road for the first time and here I am… heh. Maybe my host can roll back to a backup?

    #1331489
    Rupok
    Member

    Hi there,

    Thanks for writing in! Let us know what you are facing right now and how we could help you. If you want to roll back to a previous version then your hosting provider might help to restore a previous version.

    Cheers!

    #1331645
    Iceeyez
    Participant

    Hi Rupok!

    My host rolled back and activated the X theme instead of the childtheme.
    Host says the problem is in the Child theme.

    The customer to whom I provide this site is really picky and would like the submit buttom to say “Skicka”.
    Would be great to get you ideas for this and also give guidance as I am new to editing the childtheme. Or should I just have a quick fix without the child theme..

    #1331656
    Iceeyez
    Participant
    This reply has been marked as private.
    #1331661
    Christian
    Moderator

    Looks like you haven’t copied the whole code given here https://community.theme.co/forums/topic/changing-the-comment-form-text-in-icon-version-of-x-theme/#post-746351

    Please check.

    Thanks.

    #1331733
    Iceeyez
    Participant

    Hi Christian

    Thank you for your fast reply and sharp eye on the missing last part:)
    Was/is the code placed correctly in the childtheme? I am a bit “upset” after failing so completely on my first try editing the child theme. Now it looks like this with the broken code and the child theme is not enabled:

    <?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
    // =============================================================================

    function comment_reform ($arg) {
    $arg[‘title_reply’] = __(‘Comment Title goes here’);
    return $arg;
    }
    add_filter(‘comment_form_defaults’,’comment_reform’);

    add_filter(‘gettext’, ‘x_translate_text’ , 20, 3);
    function x_translate_text ( $translated_text, $text, $domain ) {

    $translation = array (
    ‘Submit’ => ‘Button Text’
    );

    if( isset( $translation[$text] ) ) {
    return $translation[$text];
    }
    ——

    #1331756
    Christian
    Moderator

    Please give FTP access.

    Thanks.

    #1341253
    Iceeyez
    Participant

    Hey, just wanted to info that the missing part of the code made it work. After a rollback to a backup via host dashboard I added the the end of the code to the above function, previeved the child theme live. All worked and turned the on the childtheme. Now running the first Childtheme and translation function on it changes the translation on blog submit button and Comment title.

    Many thanks!

    #1341283
    Lely
    Moderator

    You’re welcome and glad this is now working.

    Thank you for updating us.

  • <script> jQuery(function($){ $("#no-reply-1331117 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>