Tagged: x
-
AuthorPosts
-
January 15, 2017 at 3:57 pm #1331117
IceeyezParticipantHi
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.nuthis 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];
}January 15, 2017 at 4:33 pm #1331139
IceeyezParticipantTried 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?
January 15, 2017 at 11:16 pm #1331489
RupokMemberHi 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!
January 16, 2017 at 2:26 am #1331645
IceeyezParticipantHi 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..January 16, 2017 at 2:33 am #1331656
IceeyezParticipantThis reply has been marked as private.January 16, 2017 at 2:34 am #1331661
ChristianModeratorLooks 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.
January 16, 2017 at 3:35 am #1331733
IceeyezParticipantHi 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];
}
——January 16, 2017 at 3:54 am #1331756
ChristianModeratorPlease give FTP access.
Thanks.
January 23, 2017 at 3:41 am #1341253
IceeyezParticipantHey, 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!
January 23, 2017 at 4:04 am #1341283
LelyModeratorYou’re welcome and glad this is now working.
Thank you for updating us.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1331117 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
