Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #1191906

    Hi Folks,

    new question – “How to change comment box text?” …is a headline in the
    enfold-documentation. And that is exactly what I want to do, but it’s not really
    working with your example-snippet:
    ——————————————————————————————-
    //————————————–
    // function – Comment box text
    //————————————–

    function custom_comment_title(){
    ?>
    <script>
    jQuery(window).load(function(){

    // Replace coments title “Leave a Reply”.
    jQuery(“.single-post .miniheading”).text(“New text here”);

    // Replace sub-heading “Want to join the discussion? Feel free to contribute!”.
    jQuery(“.single-post .minitext”).text(“New text here”);

    // Replace submit button text “Post Comment”.
    jQuery(“.single-post .submit”).val(“New text here”);

    });
    </script>
    <?php
    }
    add_action(‘wp_head’, ‘custom_comment_title’);

    ——————————————————————————————-

    Please, take a look on my page. I only want to change the “comment title”! And I
    want to delete the sub-headings. And I also want to delete the complete “website-field”.

    Incidentally – a big “THANK YOU” to all of you for your support! You do a great job!

    Best regards
    Carsten

    #1192041

    Hey Carsten,

    Here is the code you can put in Enfold > General Styling > Quick Css,  if it does not work, put into themes/enfold/css/custom.css

    
    #top #wrap_all .comment-form-url {
      display: none;
    }
    

    Image 2020-03-10 at 22.35.58.png

    Please try the code like this:

    
    function custom_comment_title(){
    		?>
    		<script>
    		jQuery(window).load(function(){
    		
    		// Replace coments title “Leave a Reply”.
    		jQuery("#top .comment_container .miniheading").text("New text here");
    		
    		// Replace sub-heading “Want to join the discussion? Feel free to contribute!”.
    		jQuery("#top .comment_container .minitext").text("New text here");
    		
    		// Replace submit button text “Post Comment”.
    		jQuery("#top .comment_container .submit").val("New text here");
    		
    		});
    		</script>
    		<?php
    		}
    		add_action('wp_head', 'custom_comment_title');
    

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1192289

    Hi Victoria,

    thx again for your reply and the new infos!

    Unfortunately the code is not working at all
    and it doesn’t matter if I put the code in the
    “Quick-CSS-Box“ or in the “Custom.css“…sorry!

    I created a new screenshot…please take a
    new look on it. I hope it helps.

    In my other post you asked me after an temporary
    admin access. Maybe it’s help here, too?

    PS: Right now I noticed, that the “website-field“ is
    disappeared…great! Your first snippet do that. I thought
    that this snippet is for the subtext. So, that problem is fixed
    already! :-) But your other code is not working in the custom.css.
    Look at the second screenshot and you’ll see.

    Best regards
    Carsten

    • This reply was modified 4 years, 8 months ago by designbasis.
    #1192364

    Hi designbasis,

    This code:
    Image 2020-03-11 at 17.10.57.png
    has to be added in the functions.php file, this is NOT CSS! And you need to add the child theme first and then add the code there in the functions.php file, otherwise, changes will be gone with the theme update.

    To switch from your parent theme to the child theme and retain your same settings please follow these steps, first with your parent theme active go to Enfold Theme Options > Import/Export > Export Theme Settings File and download your theme settings file for fallback.
    then activate your child theme and ensure your Enfold Theme Options > Performance > JS & CSS file merging and compression is turned off along with any caching plugins, then go to Enfold Theme Options > Import/Export > Import Settings From Your Parent Theme and import, then go to your homepage and clear your browser cache a couple of times and check that the settings have taken effect.
    If it doesn’t look quite right then check that your Enfold Theme Options > Performance > JS & CSS file merging and compression is turned off and clear your browser cache a couple of more times.
    If still not quite right, then go to Enfold Theme Options > Import/Export > Import Theme Settings File and upload the theme settings file you saved earlier, and clear your browser cache a couple of more times.

    Best regards,
    Victoria

    #1192412

    Hi Victoria,

    thx for your new reply! Now everthing is fine! I’ve already installed the child-theme,
    but I didn’t notice that the other code was for the functions.php, sorry! ;-)

    BUT – you didn’t read my last reply also thoroughly, did you? ;-)

    Please, take another look on my last screenshot. I need a further code for the
    field-colour and the text-colour. Would you please so kind?…thank you! :-)

    And a little addition – in the answer-mode I wanna change also the title!
    Please, look at the second screenshot. Thank you very much!

    Best regards
    Carsten

    • This reply was modified 4 years, 8 months ago by designbasis.
    #1192753

    Hi Carsten,

    Here is the code you can put in Enfold > General Styling > Quick Css,  if it does not work, put into themes/enfold/css/custom.css

    
    .comment_text p,
    #top #commentform label {
      color: #ccc;
    }
    #top #wrap_all .comment-form-url {
      display: none;
    }
    #top .main_color input[type="text"] {
        background-color: #aa5356;
    }
    

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1192897

    Hi again Victoria,

    thx for the new code-snippets! They work, but unfortunately not perfect.

    At first – I don’t know exactly for what this snippet should be:
    ———————————————————-
    #top #wrap_all .comment-form-url {
    display: none;
    }
    ———————————————————-

    After putting your complete new snippets into the “custom.css“ the colour of
    the field and text is now correct!

    But now the colour of the text within the fields is also white and by writing it,
    it’s not showing up directly in the field. You also can’t see the cursor if you
    click into the field. But after writing invisible, the text is anyhow in the field.
    Please, try by yourself and you’ll see what I mean. I also made a screenshot
    of it.

    And please take another look at the “answer-mode” together with the second
    screenshot! There are 3 more little probs to solve. Thanks very much!

    Best regards
    Carsten

    • This reply was modified 4 years, 8 months ago by designbasis.
    #1193784

    Hi,
    This code:

    #top #wrap_all .comment-form-url {
    display: none;
    }

    is to hide the “website” field.
    To change the color of the text when entered into your form so it is red and not the same orange as the background color, Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:

    #top .main_color input[type="text"], #top .main_color select {
        color: #720c10 !important; 
    }

    Best regards,
    Mike

    #1193886

    Hi Mike,

    thank you for your new reply! And of course this snippet hide the
    “website field“…who can read has an advantage, right? ;-) Sorry,
    for that stupid question.

    And your new snippet works perfect…thx again! Now, this thing
    is solved. :-) But as I has written it in bold in the last entry – 3
    little things are left…in the answer-mode. Please, take a new look
    at the screenshot and you’ll understand immediately. If you can
    help me with that probs too, I’ll be very happy! :-)

    Best regards
    Carsten

    #1194080

    Hi,
    Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:

    #respond span.required {
        display: inline-block !important; 
    }
    .commentlist #respond #comment {
        width: 100% !important; 
    }

    and then add this code to the end of your functions.php file in Appearance > Editor:

    function custom_reply_title(){
      ?>
      <script>
    (function($){
      $(document).ready(function(){
      $("h3#reply-title").text("Liebes Publikum, schreib mir doch etwas Nettes :-)");
      });
      })(jQuery);
      </script>
    <?php
    }
    add_action('wp_footer', 'custom_reply_title');

    Best regards,
    Mike

    #1194142

    Hi Mike,

    thx for your new answer and code!

    The snippet for the “Quick CSS” works perfect, but after I put the new code-lines
    into the functions.php file there is small failure. If you click right now on “answer“
    then not the answer-mode opens but it links to the commentary-field. So, there
    must be a little mistake, but I’m sure you’ll find him! :) Take a look on the new screen-
    shot. That is the current functions.php file.

    Best regards
    Carsten

    #1194165

    Hi again Mike,

    sorry, but I discovered unfortunately another small failure with Victorias
    last code-snippets:
    ————————————————————————————
    .comment_text p,
    #top #commentform label {
    color: #ccc;
    }
    #top #wrap_all .comment-form-url {
    display: none;
    }
    #top .main_color input[type=”text”] {
    background-color: #aa5356;
    }
    ————————————————————————————
    They working as far as good in the “commentary-area“, but unfortunately
    these snippets clash with the “contact-form“. Take a look at the screenshots.
    If the code is not in than the contact-form looks like png1 and if they in it
    looks like png2. So, what is here to do?

    Best regards
    Carsten

    #1194395

    Hi,
    For the contact form please remove this part of the css:

    #top .main_color input[type="text"] {
        background-color: #e69d37;
    }

    so we can see how to adjust it, and also remove the code in the functions.php that I gave you that is causing the error.
    It may be easier if we had an admin login so we can adjust these snippets.

    Best regards,
    Mike

    #1194553

    Hi Mike,

    thx for your new answer and the infos!

    Ok, with removing the snippet the problem with the contact form is
    “half solved“. ;-) Because now I have a new small prob with the text-
    colour in the fields. I thought it was solved, but maybe there is another
    snippet which is colliding with another snippet. ;-/ Please, take a look
    at the screenshot and you’ll see.

    I think it has to do with this snippet…am I right?
    ———————————————————————————
    #top .main_color input[type=”text”] , #top .main_color select
    {
    background-color: #720c10;
    color: #e69d37;
    border: none;
    }
    ———————————————————————————
    Actually the colours in the snippet are correct, but they aren’t show up
    correctly in the frontend. Because at the moment the text-colour is
    the same as the background-colour. And further I want to change the
    colour of the name of the main-textfield, as you can see in the screenshot.

    By the way… you’ll find the admin-login-data in the private content field. :)

    Thanks again for your help!

    Best regards
    Carsten

    #1194790

    Hi,
    Thanks for the login, on the contact form what color do you want the “Nachricht” text? Are the other placeholders colors correct?
    The placeholder color for the “Nachricht” text is set by:

    .responsive #top ::placeholder {
    	color: #ad0e08;
    	opacity: 1;
    	font-family: 'Montserrat Alternates', sans-serif;
            font-size: 17px!important;;
    }

    So what is wrong with this is that it is too general and it sets the color to all placeholders, I recommend setting a custom class for the contact form:
    2020-03-20_065045.png
    you can add this custom class to all of your contact forms, and then change the css to this:

    .responsive #top .contact-form ::placeholder {
    	color: blue !important; 
    }

    Notice I changed the color to blue just for example to show that this doesn’t change the color on the comment forms.
    For the other placeholders please try:

    #top #wrap_all #main .main_color .contact-form input::placeholder,#top #wrap_all #main .main_color .contact-form span.value_verifier_label {
    	color: blue !important;
    }

    This will change the color of the input text:

    #top .main_color .contact-form input[type="text"]{
    	color: blue !important;
    }

    Best regards,
    Mike

    #1194862

    Hi Mike,

    thx again for your answer and the new informations!

    After a second’s thought I did understand and now the contact form is
    like I wanted to have…fine! :-)

    But unfortunately the comment fields now have a new problem again,
    which has actually already been solved ;-/ The placeholder-fields
    have the wrong colour again…in the “basic-mode“ and in the “answer-
    mode“, too. We know the answer already. It is this snippet:
    ——————————————————————————–
    #top .main_color input[type=”text”] {
    background-color: #e69d37;
    }
    ——————————————————————————–
    It collides with the contact-form-placeholder-fields! And now?

    And there is still another prob left…I wanted to change the title of the
    answer-mode. If you could give me a solution for that also, it would
    be great!

    Best regards
    Carsten

    #1195057

    Hi,
    For the contact form “name” & “email” we will adjust the css to target the contact form, I added this:

    #top .main_color #commentform input[type="text"] {
    background-color: #e69d37;
    }

    note the added “#commentform”

    Best regards,
    Mike

    #1195148

    Good evening Mike,

    thx for your new reply and the support! I think, now it works…contact-
    and comment-form…super! Is it possible that in your first sentence
    you wanted to write “comment form” instead of “contact form”? It seems
    so to me. But anyway…now both parts working well and that is the
    most important! Thanks again!

    Ok, but there is further a small “but“…please take a look again on the
    screenshot_2. I wanna still change the title in the answer-mode. Would
    you please so kind? :)

    Best regards
    Carsten

    #1195250

    Hi,
    Glad to hear this helps. As for the “answer-mode” title, I’m having trouble because the two modes are actually combined and it seems that anything I add was braking it.
    But I believe I have it working with this function:

    function custom_hard_script(){
      ?>
      <script>
    (function($){
      $(document).click(function(){
      	if ($('.commentlist #reply-title').css('display') == 'block'){
         $("#reply-title").html(function() {
        return $(this).html().replace("Schreibe einen Kommentar", "Liebes Publikum"); 
    });
      	} else {}
      });
      })(jQuery);
      </script>
    <?php
    }
    add_action('wp_footer', 'custom_hard_script');

    just change “Liebes Publikum” in the code to what you wish.
    Try adding this code to the end of your functions.php file in Appearance > Editor and Then clear your browser cache and any cache plugin, and check.
    I also believe that you may need to log out from admin to see the “answer-mode”

    Best regards,
    Mike

    #1195255

    Bon Sunday Mike,

    thanks very much…now everything is fine! The new code works great! :)
    And again, sorry for this inconvenient wish! True to the motto: why easy,
    when it can also be difficult? See you soon at the next problem! ;)

    Best regards
    Carsten

    #1195266

    Hi,
    I’m so glad this is working for you :) While it was hard, I now have that satisfied feeling :)
    We will close this and look for your next “easy” question ;)

    Best regards,
    Mike

Viewing 21 posts - 1 through 21 (of 21 total)
  • The topic ‘How to change comment box text?’ is closed to new replies.