1

hi i have added a code in function file of the theme to show a default custom message after the user leaves a comment of the blogposts . it reads like this .

add_filter('after_comment_text', 'add_custom_content');
function add_custom_content( $comment_text, $comment ) {
        if ($comment_text) {
                $comment_text .= "<div class='wpd-custom-text'>the comment added here is by the author and my website doesn't have any take on this .. </div>";
        }
        return $comment_text;
}

i would like to change the font size and font (may be in indices) of the custom message i added ie the comment added here is by the author and my website doesn't have any take on this ..what should i change in this code to attain the same thank you

1 Answer 1

0

You can use CSS, either in a separate CSS file like this:

.wpd-custom-text{
  color: #f44242;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  font-weight: 900;
}

or inline like this:

<div class='wpd-custom-text' style="color:#f44242; font-family: 'Arial', 'Helvetica', sans-serif; font-size: 15px; font-weight: 900;">the comment added here is by the author and my website doesn't have any take on this .. </div>

Depending on the web fonts available to your site, just change the font-family, font-size and font-weight values.

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.