This topic has 9 replies, 3 voices, and was last updated 9 years by Nick Plutte.
-
Author
-
December 11, 2014 at 13:02 #38538kristapswParticipant
How can I edit text in this form? And where to find css file?
December 11, 2014 at 14:24 #38552RaduModeratorHello,
You cand change this text from Theme Options Panel -> Layout Settings -> scroll down at this field “Contact form text”.
For custom css you can add your code from Theme Options -> General settings -> Quick css, or you can use kelo-child for your customization.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionDecember 11, 2014 at 14:53 #38581kristapswParticipantBut, when can I change the text like “Your Name” etc.?
December 11, 2014 at 16:09 #38620RaduModeratorFor this you need to edit wp-content\themes\kleo\lib\theme-functions.php ,
search for function kleo_contact_form , inside this function you need to replace “Your Name”,”Your Email” and “Type your message…” with your prefered text. see screenshot below.NOTE : Is not recommended to modify core theme files.
Recommended solution :
You need to install kleo-child theme, and insert in kleo-child functions.php this code after set your preferred text.
COPY CODEif (!function_exists('kleo_contact_form')) { function kleo_contact_form( $atts, $content = null ) { extract(shortcode_atts(array( 'title' => 'CONTACT US' ), $atts)); $output = ''; $output .= '<div class="kleo-quick-contact-wrapper">' .'<a href="#"><i class="icon-mail-alt"></i></a>' .'<div id="kleo-quick-contact">' .'<h4 class="kleo-qc-title">'. $title .'</h4>' .'<p>'. do_shortcode($content).'</p>' .'<form class="kleo-contact-form" action="#" method="post" novalidate>' .'<input type="text" placeholder="'.__("Your Name",'kleo_framework').'" required id="contact_name" name="contact_name" class="form-control" value="" tabindex="276" />' .'<input type="email" required placeholder="' . __("Your Email",'kleo_framework') . '" id="contact_email" name="contact_email" class="form-control" value="" tabindex="277" />' .'<textarea placeholder="' . __("Type your message...",'kleo_framework') . '" required id="contact_content" name="contact_content" class="form-control" tabindex="278"></textarea>' .'<input type="hidden" name="action" value="kleo_sendmail">' .'<button tabindex="279" class="btn btn-default pull-right" type="submit">'. __("Send",'kleo_framework').'</button>' .'<div class="kleo-contact-loading">'. __("Sending",'kleo_framework').' <i class="icon-spinner icon-spin icon-large"></i></div>' .'<div class="kleo-contact-success"> </div>' .'</form>' .'<div class="bottom-arrow"></div>' .'</div>' .'</div><!--end kleo-quick-contact-wrapper-->'; return $output; } add_shortcode('kleo_contact_form', 'kleo_contact_form'); }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 26, 2015 at 01:04 #51562Nick PlutteParticipantHi,
I have the same issue as kristapsw and would like to use the recommend second way.
Can I just copy the parent functions.php and paste it to my child theme? I have in mind that the functions.php is a bit tricky compared to other php or css files.
Cheers Nick
March 26, 2015 at 16:53 #51651RaduModeratorHello Nick Plutte,
Paste only the code from above to your kleo-child/functions.php
That’s all
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 26, 2015 at 17:10 #51662Nick PlutteParticipantHi Radu,
thanks for your quick reply. I added the following code to my child theme’s functions.php, but it does not work. I also added two Screenshots to illustrate the changes. After editing of the file the letter symbol is not clickable any more.
Here is my custom code:
COPY CODE/* Change Placeholder in Kleo Quick Contact Form */ if (!function_exists('kleo_contact_form')) { function kleo_contact_form( $atts, $content = null ) { extract(shortcode_atts(array( 'title' => 'CONTACT US' ), $atts)); $output = ''; $output .= '<div class="kleo-quick-contact-wrapper">' .'<a href="#" rel="nofollow"><i class="icon-mail-alt"></i></a>' .'<div id="kleo-quick-contact">' .'<h4 class="kleo-qc-title">'. $title .'</h4>' .'<p>'. do_shortcode($content).'</p>' .'<form class="kleo-contact-form" action="#" method="post" novalidate>' .'<input type="text" placeholder="'.__("Dein Name",'kleo_framework').'" required id="contact_name" name="contact_name" class="form-control" value="" tabindex="276" />' .'<input type="email" required placeholder="' . __("Deine Email",'kleo_framework') . '" id="contact_email" name="contact_email" class="form-control" value="" tabindex="277" />' .'<textarea placeholder="' . __("Nachricht an uns...",'kleo_framework') . '" required id="contact_content" name="contact_content" class="form-control" tabindex="278"></textarea>' .'<input type="hidden" name="action" value="kleo_sendmail">' .'<button tabindex="279" class="btn btn-default pull-right" type="submit">'. __("Senden",'kleo_framework').'</button>' .'<div class="kleo-contact-loading">'. __("Sending",'kleo_framework').' <i class="icon-spinner icon-spin icon-large"></i></div>' .'<div class="kleo-contact-success"> </div>' .'</form>' .'<div class="bottom-arrow"></div>' .'</div>' .'</div><!--end kleo-quick-contact-wrapper-->'; return $output; } add_shortcode('kleo_contact_form', 'kleo_contact_form'); }
Attachments:
You must be logged in to view attached files.March 27, 2015 at 15:47 #51822RaduModeratorHello,
Here is a working code
COPY CODEif (!function_exists('kleo_contact_form')) { function kleo_contact_form( $atts, $content = null ) { extract(shortcode_atts(array( 'title' => 'CONTACT US' ), $atts)); $output = ''; $output .= '<div class="kleo-quick-contact-wrapper">' .'<a class="kleo-quick-contact-link" href="#"><i class="icon-mail-alt"></i></a>' .'<div id="kleo-quick-contact">' .'<h4 class="kleo-qc-title">'. $title .'</h4>' .'<p>'. do_shortcode($content).'</p>' .'<form class="kleo-contact-form" action="#" method="post" novalidate>' .'<input type="text" placeholder="'.__("Your Name",'kleo_framework').'" required id="contact_name" name="contact_name" class="form-control" value="" tabindex="276" />' .'<input type="email" required placeholder="' . __("Your Email",'kleo_framework') . '" id="contact_email" name="contact_email" class="form-control" value="" tabindex="277" />' .'<textarea placeholder="' . __("Nachricht an uns...",'kleo_framework') . '" required id="contact_content" name="contact_content" class="form-control" tabindex="278"></textarea>' .'<input type="hidden" name="action" value="kleo_sendmail">' .'<button tabindex="279" class="btn btn-default pull-right" type="submit">'. __("Send",'kleo_framework').'</button>' .'<div class="kleo-contact-loading">'. __("Sending",'kleo_framework').' <i class="icon-spinner icon-spin icon-large"></i></div>' .'<div class="kleo-contact-success"> </div>' .'</form>' .'<div class="bottom-arrow"></div>' .'</div>' .'</div><!--end kleo-quick-contact-wrapper-->'; return $output; } add_shortcode('kleo_contact_form', 'kleo_contact_form'); }
RECOMMENDED SOLUTION : You can translate that strings from Codestyling Localization.
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 27, 2015 at 16:44 #51842Nick PlutteParticipantHi Radu,
thank you for the new snippet, works beautifully now.
Cheers Nick
-
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.