Change text using Child functions.php

  • zaqwsxcderfv2


    Hi all,

    I want to change some output text on my website, using code like the ‘function graphene_filter_gettext’ code found on this forum:

    function graphene_filter_gettext( $translated, $original, $domain ) {
    $strings = array(
    'Category Archive: <span>%s</span>' => '<span>%s</span>',
    '%1$s Archive: %2$s' => '%2$s',
    if ( ! empty( $strings[$original] ) ) {
    $translations = &get_translations_for_domain( $domain );
    $translated = $translations->translate( $strings[$original] );
    return $translated;
    add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );

    I use this to get rid of the “Category Archive:” and this works fine.

    But, I also have some code displaying the day of the week. Say “Monday”. But I want to change this to the Dutch equivalent “Maandag”. I thought this would do the trick:

    'Monday' => 'maandag'

    And add it to the code above. But that is not working. Does anybody know a general code to use in the Child functions.php to change one word to the other?


    ps. the .MO file is already correct translated. So I do not think that will solve this.



    Put code in between backtick (


    ) characters. It’s usually located above the Tab key on your keyboard.



    Hi Prasanna,

    I used the ‘ on my Mac, but that did not do the job. Next time I try to use the `. Thank you for making my post more clear.




    You can also select the whole code and press code button in the editor.

Viewing 4 posts - 1 through 4 (of 4 total)

  • You must be logged in to reply to this topic.