1

Im like 99% done with my multisite.

The only thing left to do is to change the read more link on the child theme. But I can't get it done.

Main site (Dutch): www.jeroenbrugman.com 2nd site(english): www.jeroenbrugman.com/en/

I need to change the read more text on the 2nd site. But I can't get it done.

Main site functions.php code:

if ( !function_exists( 'modify_read_more_link' )) {
  add_filter( 'the_content_more_link', 'modify_read_more_link' );
function modify_read_more_link() {
return '<a class="more-link" href="' . get_permalink() . '">Lees meer</a>';
}
}

2nd site functions.php code:

  add_filter( 'the_content_more_link', 'modify_read_more_link' );
function modify_read_more_link() {
return '<a class="more-link" href="' . get_permalink() . '">Read more</a>';
}

But the 2nd site still shows 'Lees Meer' from the main site.. How can I get this to work?

Kind Regards

6
  • Which one is the parent theme and which one is the child?
    – Rarst
    Commented Nov 30, 2015 at 17:36
  • Main site is the parent. 2nd site is the child. Sorry for not clarifying this. Commented Nov 30, 2015 at 19:45
  • What you are doing should work. There is something else happening. What happens if you completely comment out the parent modify_read_more_link() function (just for debugging)?
    – s_ha_dum
    Commented Nov 30, 2015 at 22:19
  • @s_ha_dum What do you exactly mean? I removed the modify_read_more_link() after the_content_more_link but that did;t work Commented Dec 1, 2015 at 12:55
  • So what happened exactly? I am try to get you to debug and provide additional information. "That didn't work" doesn't help.
    – s_ha_dum
    Commented Dec 1, 2015 at 13:47

1 Answer 1

0

How about calling the 2nd function like this:

add_filter( 'the_content_more_link', 'modify_read_more_link_en' );
function modify_read_more_link_en() {...

??

2
  • Didn't work :( I tried soo many different codes. Commented Nov 30, 2015 at 17:38
  • Been googling like crazy. Nothing what I found has helped. Commented Nov 30, 2015 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.