Contact Form 7 Issues Tricks and Solution

Promo Code or Coupon Code field in Contact Form 7 or changing value based on specific key typed

Few days ago one of my client requested me to implement a promo code field ( screenshot attached) in payment form (which i helped him created using contact form 7) to show a discounted price. I helped him implemented this and sharing you the code.


  1. Here is the Contact form 7 field to use
[text couponcode placeholder "Promo Code"]

<span class="discountedPrice"> </span>

2. Here is the jQuery code ( Use Simple Custom CSS and JS plugins for this)

     jQuery('input[name="couponcode"]').on('input keyup', function(e){	
	let couponcode= jQuery( 'input[name="couponcode"]' ).val().trim(); 



Feel free to do ask comments in the comments box if you face any issue.

Contact Form 7 Issues Tricks and Solution

Click on Paypal button or Redirect to Paypal page after successful submssion or mail sent.

Suppose you have a paypal button to collect money or sale product and you want your client to submit Contact form 7 form too. To make that work easy for your client it is wise to redirect your client to paypal payment collection after successful submission of the form. Here is the procedure

  1. Add this plugins Contact Form 7 Redirection

2. Like the image a new tab “Redirect Settings” will be added

3. Like the Screenshot above you can put the External URL or Paypal url and select “Use External URL”

Instead or redirecting to external url or paypal url if you want to Click Automatically to Paypal Payment button, then use this technique

jQuery(document).ready(function() {

please replace this selector button.paypal-button.large with your payment button selector.

If you face issue or need help please do comments in the comments box.

WordPress Tricks

Common CSS For GutenBerg Editor To modify Headers, blockquotes and titles

To change Font size, color and font family of BlockQuote in Gutenberg Editor

blockquote.wp-block-quote, blockquote, blockquote p {
    font-size: 23px !important;
    color: darkred !important;
    font-family: cursive !important;
    font-style: italic !important;
    text-transform: uppercase;
    line-height: 27px !important;

To change header ( say h5) font size, color, italic style, uppercase and more in Gutenberg Editor

.wp-block-column h5 {
    font-size: 20px !important;
    color: darkred;
    font-family: cursive;
    text-transform: uppercase;
    text-align: center;
    font-style: italic;
    border-bottom: 2px solid red;

In Single page if you want to change the Page Titl’e font size, color, uppercase , alignment in Gutenberg Editor ( applicable for single post too)

h1.entry-title {
    font-size: 27px;
    color: darkred !important;
    font-family: cursive !important;
    font-style: italic !important;
    text-transform: uppercase !important;
    text-align: center !important;

WordPress Tricks

Radiate By ThemeGrill : Modifications of Header, Footer, Sidebar, menus,titles and more

Radiate By ThemeGrill is a clean, creative and minimal personal blogging responsive WordPress theme. The theme has full width slider to highlight some of your unique posts and has featured pages section to tell more about you. Just focus on writing beautiful content and everything else will be handled by this theme in a simple manner.

Continue reading “Radiate By ThemeGrill : Modifications of Header, Footer, Sidebar, menus,titles and more”

WordPress Tricks

Missing field “review” “brand” “availability” “url” how i solved it for Woocommerce Products

Recently one of my client ask me to solve the issue which you are seeing in the screenshot. I searched a lot in internet and support forums and found woocommerce has some issue with structured data and I didn’t find any good plugins which can help me solving this.

As woocommerce is generating the structured data, to solve this issue I blocked the “application/ld+json” related code generating by woocommerce. Just do this steps.

  1. Login to dashboard
  2. Go to Plugins > Plugin Editor
  3. Select Woocommerce
Select Woocommerce

4. Go to \includes\class-wc-structured-data.php

5. Block this line (put // just before this line)

echo '<script type="application/ld+json">' . wc_esc_json( wp_json_encode( $data ), true ) . '</script>'; 

6. Now check again your page / product using this . Issue will not be showing now

If You Have Any Better Solution Feel Free To Let Me Know In The Comments Section

Contact Form 7 Issues Tricks and Solution

Contact Form 7 Multi Step Form: Solution of Redirecting Different Form Based On Selection

Contact Form 7 Multi Step Form Redirect to Different Form Based on Selection

This Post is for advanced users. So if you are using Contact Form 7 and Contact Form 7 Multi Steps Form and want your form to go to or Redirect Different Form based on Radio button or Drop down or Checkbox selection, then this post can help you.

I have used Jquery and Ajax to solve this issue. If you have any Question, Please ask question in the comments section.


	var ompp= jQuery(this).val();
		url:"<?php echo admin_url('admin-ajax.php');?>",
		contentType: "application/x-www-form-urlencoded;charset=UTF-8",
    		action: 'stravyfuncajax23',
	  success: function(responsea){
if(responsea=="Build Muscle"){
document.addEventListener( 'wpcf7mailsent', function( event ) {
    if ( event.detail.contactFormId === "1719") { location.replace("");}}, false );
document.addEventListener( 'wpcf7mailsent', function( event ) {
    if ( event.detail.contactFormId === "1719") { location.replace("");}}, false );




in Function.php

function searchbyom(){
$searchword1= $_GET['radiovalue'] ; 

if($searchword1=="Build Muscle"){

 echo "Build Muscle";
echo "Lose Weight";
The Contact Form 7 Code i used

First Name:
[text your-name]

Last Name:
[text last-name]

What is your goal?
[radio radio-20 default:0 "Lose Weight" "Build Muscle"]

[submit "Continue Questionnaire"][multistep "2-5"]
<div id="bm"></div>
Web Development

Button Click and Website Color Change : Applicable for wordpress /HTML/PHP and other sites

If you want to create a website and want your visitor to view your site in dark mode or in different color, then this example is for you. I am sharing you the zip version of the example. Just download the zip and check the index.html file.

I have created the example with 2 style sheet. One for Light (white) version and another for Darker version. So, when you will visit the site for first time, it will be Light version and then if you click on the button, it will be darker version. Click Here To Download.

Button Click and Website Color Change


Load Contact Form 7 Scripts only in Contact page to increase GTmetrix score

Few days ago one of my client ask me helping to increase GTmetrix score. While checking I found Contact Form 7 script is loading in homepage and it is hampering the score. Though the Hompage doesn’t have Contact Form to show. To increase the score, it was wise to load the Contact Form 7 script to load only in Contact Page.

To solve this issue I used this code which helps me the Contact Form 7 script not to load in Homepage, but only in Contact page where the form is used. Just use the code below in your theme’s function.php

Continue reading “Load Contact Form 7 Scripts only in Contact page to increase GTmetrix score”

WordPress Tricks

Theme for Crafters and Designers : Button 2 by Automattic. Modifications, support and Customization

Button 2 is a theme that’s as cute as its name. With detailed accents, featured images, and a soft color palette, Button 2 is perfect for crafters and designers. So, if you want to show your Craft and Design related work in a website, then this wordpress theme is for you. You can use it for free. You can see the Demo of Button2 theme.

Button 2 by Automattic Modifications support and customization css

Download Button2 Theme by Automattic Parent Theme

Download Button 2 by Automattic Child Theme

I have shared some css customization process of Button2 theme.You can use the codes i shared to give it a new look of your own. Also you can ask question regarding any issue you are facing in comments section.

Continue reading “Theme for Crafters and Designers : Button 2 by Automattic. Modifications, support and Customization”