Tagged: x
-
AuthorPosts
-
August 23, 2016 at 4:53 am #1142815
Mads HParticipantHi there.
I am losing my mind here. Been searching for a way to translate the READ MORE BUTTON in the post masonry grid.
It should say LÆS MERENone of the suggestions in the forum have been able to solve the problem.
Attached is a screendump, so you shouldn’t be in doubt.
http://www.sundgaardadvokatfirma.dk
Newest Wordrpress version (as of today)August 23, 2016 at 4:56 am #1142818
Mads HParticipantThis reply has been marked as private.August 23, 2016 at 8:13 am #1143016
ThaiModeratorHi There,
In order to translate that string, you can simply use following code in your child theme’s functions.php file:
add_filter('gettext', 'x_translate_text' , 20, 3); function x_translate_text ( $translated_text, $text, $domain ) { $translation = array ( 'Read More' => 'LÆS MERE' ); if( isset( $translation[$text] ) ) { return $translation[$text]; } return $translated_text; }Hope it helps.
August 25, 2016 at 6:10 am #1146442
Mads HParticipantHi there
I’m sorry, but it is still not working…
Did I paste it it the wrong place?
<?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’ ); WAS ALREADY THERE…
add_filter(‘gettext’, ‘x_translate_text’ , 20, 3);
function x_translate_text ( $translated_text, $text, $domain ) {$translation = array (
‘Read More’ => ‘LÆS MERE’
);if( isset( $translation[$text] ) ) {
return $translation[$text];
}return $translated_text;
}
// Additional Functions
// =============================================================================?>
August 25, 2016 at 9:11 am #1146623
ChristianModeratorHey there,
Sorry for the confusion. Since you’re using Visual Composer’s element, you will need to use a plugin such as WPML.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1142815 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
