How to update Child Theme?
-
Dear Sir,
I’m quite new to wordpress, php and html. please advise how to update child theme as i need to place the coding below.
My objective is to update the “Text” in “more tag”….
Please advise step by step….
// Change "Read the rest of this entry" link Button
function graphene_filter_readmore( $translated, $original, $domain ) {
$strings = array(
'Continue reading »' => 'My New Text »',
);
if ( ! empty( $strings[$original] ) ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'graphene_filter_readmore', 10, 3 );Thank you….
Create a new file named
functions.phpin child theme and add the above code after the opening php tag, i.e<?php. So your child-theme functions.php should look like this,<?php
// Change "Read the rest of this entry" link Button
function graphene_filter_readmore( $translated, $original, $domain ) {
$strings = array(
'Continue reading »' => 'My New Text »',
);
if ( ! empty( $strings[$original] ) ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'graphene_filter_readmore', 10, 3 );Put code in between backtick (
Code:`) characters here in this forum. It’s usually located above the Tab key on your keyboard.
Try this,
<?php
// Change "Read the rest of this entry" link Button
function graphene_filter_readmore( $translated, $original, $domain ) {
$strings = array(
'Continue reading »' => 'My New Text »',
);
if ( ! empty( $strings[$original] ) ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'graphene_filter_readmore', 10, 3 );Only change My New Text » in the above code.
Dear Prasanna,
I’ve already try using your code as below but it still doesn’t change the “more tag” . (you may see result @bpkconcrete.com)

I’m not sure are there any other step to do after create child theme folder, create style.css and function.php ?
Please advise…
Do you want to translate Continue reading » or Read the rest of this entry »? Because I see Read the rest of this entry » on your homepage. If that’s the case, change
'Continue reading »' => 'My New Text »',to
'Read the rest of this entry »' => 'My New Text »',in the array.You need to activate the child theme!
WordPress treats the child theme as an entirely different theme. So, when you activate it, the header, background image, custom menus all revert back to defaults. Just go to respective sections and re-assign them.
Viewing 10 posts - 1 through 10 (of 11 total)
- 1
- 2
- You must be logged in to reply to this topic.


