Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #722321

    Hi, I have been searching for a quite awhile in the forum and have not found an answer to this yet.

    1) I just want to replace the “Leave a Reply” default text with something else. The normal ‘gettext’ function I’ve used before in wordpress does not seem to work with Enfold

    function replace_text($text) {
    $text = str_replace(‘Leave a Reply’, ‘New String Here’, $text);
    return $text;
    }
    add_filter(‘the_content’, ‘replace_text’);

    Currently, this is the only code I have on the child theme functions.php page and adding the code above to functions.php has no effect. How do I change the default text above? Thanks.

    • This topic was modified 7 years, 11 months ago by waterwalk. Reason: I solved part of the question myself but need help still with remaining question
    #722654

    Hi, anyone have an answer to this question from yesterday? Typically this is very easy to do in wordpress by adding the code above to the functions.php. I’m hoping this is doable in Enfold without having to change core files. Please let me know. Thanks.

    #723359

    Hi,

    It seems like you figured it out already? :)

    For future readers, please create a child theme – http://kriesi.at/documentation/enfold/using-a-child-theme/ and then copy enfold/comments.php file to your child theme and find

    
    echo "<h3 class='miniheading'>".__('Leave a Reply','avia_framework')."</h3>";

    and change it as needed

    Best regards,
    Yigit

    #723498

    Yes, it wasn’t the way I would have liked to do it (prefer doing wordpress getText text replacement so that I don’t have to worry about any updates I might miss by having my own ‘comments.php’ in my child theme. It seems there are a few standard wordpress tricks that don’t really work with enfold. Thanks for getting back to me.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Replace Default Text’ is closed to new replies.