Modifying Comments.php in Frontier Child-Theme

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #5171
    Len W. Brown

    Hi Ron! I created a comments.php file in my child theme folder and it worked beautifully for several different things I was working on. However, I figured out how to both create my own plugin for one thing, and move some others to functions.php in the child theme folder.

    Now, the modification I have that only currently seems to work in the comments.php of the primary Frontier Theme and not in the child folder is:

       'comment_notes_before' => '<p class="comment-notes">' . __( 'NOTE: I manually approve all comments.  As long as you’re not being rude, obscene, advertise, or other nonsense, your comment/question and my response will appear on this page within a day or so.  Please be patient!' ) . ( $req ? $required_text : '' ) . '</p>'

    How, may I ask, can I get this out of the main comments.php and into the child theme to preserve it when I next update your theme? Do I need to essentially replicate the entire comments.php from the main theme to the child, with this modification shown then? I seem to have been having issues where the comments portion of my pages all seem to simply vanish altogether when I’ve tried, while leaving everything else intact.

    Thanks much!

    Len W. Brown

    A perfect example of it working on my site ATM, is a tutorial I just posted yesterday and already manually accepted several comments. This is working using the modification on the main Frontier Theme without a current comments.php in the child-theme:



    This would be placed on the child-theme’s functions.php

    function ra_comment_form_defaults( $defaults ) {
         $defaults['comment_notes_before'] = 'Warning! Spamming is against the law.';
         return $defaults;
    add_filter( 'comment_form_defaults', 'ra_comment_form_defaults' );

    For the code above to work, you have to remove any modifications to the original comments.php if there are any. The function that calls the comment form must simply be <?php comment_form(); ?>

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Frontier’ is closed to new topics and replies.