Skip to content
Free Consultation shortcode inside Blog post for WordPress!
jsplus
18.04.2024.
Free Consultation shortcode inside Blog post for WordPress!

Introduction

In the ever-evolving world of digital marketing, businesses are constantly seeking innovative ways to engage their audience and convert visitors into customers. One effective method of achieving this is by offering free consultations. A free consultation is a valuable offering that can build trust and credibility with potential clients, helping them to understand your expertise and offerings better. But how do you seamlessly integrate this offering into your WordPress blog? That’s where a custom shortcode for free consultations comes into play.

In this article, we will explore the benefits of integrating a free consultation shortcode inside your WordPress blog post, as well as guide you through the process of setting up and using this feature. By the end of this article, you will have a clear understanding of how this technique can enhance your blog and business.

Benefits of a Free Consultation Shortcode

  1. Increased Engagement: By offering a free consultation, you encourage readers to interact with your business. This can lead to higher engagement levels, as potential clients take advantage of your offer to learn more about your services.
  2. Lead Generation: A free consultation serves as a great lead generation tool. Visitors who are interested in your services can sign up for the consultation, providing you with their contact information and opening the door for future communication.
  3. Building Trust: Offering free consultations helps establish trust with potential clients. It shows that you are willing to share your expertise and assist them without any immediate financial commitment.
  4. Improved Conversion Rates: By providing a free consultation option directly within your blog post, you increase the chances of converting visitors into paying customers.

Integrating a Free Consultation Shortcode

Now that we understand the benefits, let’s dive into how to integrate a free consultation shortcode inside your WordPress blog post.

Code Snippet

In your WordPress theme’s functions.php file, add the following code snippet:

function free_consultation_shortcode() {
    // Start output buffering
    ob_start();
?>
    <div class="relative my-6 overflow-hidden bg-gray-200 max-lg:max-w-[calc(100%+48px)] max-lg:-mx-6 bg-dot-pattern">
        <svg class="absolute top-0 right-0 z-0 pointer-events-none select-none w-[80%] h-auto" width="587" height="84" viewBox="0 0 587 84" fill="none" xmlns="http://www.w3.org/2000/svg">
            <path d="M8.00004 -112.146C8.00004 -135.382 18.5456 -158.127 37.9718 -179.497C57.4167 -200.887 85.4066 -220.476 119.182 -237.094C186.736 -270.33 276.05 -291 362.136 -291C448.179 -291 525.686 -270.352 581.412 -237.386C637.316 -204.316 670 -159.774 670 -112.147C670 -62.1384 654.886 -15.399 619.392 18.8701C583.888 53.1485 526.906 76 441.062 76C354.999 76 245.759 53.0136 158.139 17.2195C114.33 -0.676899 76.3759 -21.5953 49.5222 -44.0948C22.4599 -66.769 8.00005 -89.8924 8.00004 -112.146Z" stroke="#FACC15" stroke-width="16" />
        </svg>
        <div class="px-6 py-36 lg:px-12 lg:py-16 relative z-[1]">
            <div class="text-gray-800">
                <div class="mb-8 text-3xl font-bold lg:mb-6 lg:text-4xl">Free Consultation</div>
                <div class="text-xl leading-8 lg:text-base">We thrive on tackling complex challenges and delivering successful outcomes for startups and enterprises. Schedule a free consultation to discuss your project and see how our expertise can propel your business forward.</div>
                <div class="flex mt-8 lg:mt-1 lg:justify-end">
                    <div class="">
                        <a href="#" class="flex items-center font-bold no-underline group relative z-[1]">
                            <span class="relative mr-4 font-extrabold group-hover:underline">
                                <span class="text-2xl">Get in touch</span>
                                <svg class="absolute left-0 z-0 w-full pointer-events-none top-[70%]" width="215" height="42" viewBox="0 0 215 42" fill="none" xmlns="http://www.w3.org/2000/svg">
                                    <path fill-rule="evenodd" clip-rule="evenodd" d="M62.7049 6.69715C51.9018 7.99109 41.2053 9.66704 30.5241 11.8627C25.5057 12.8917 23.0548 13.4725 18.488 14.7359C18.0262 14.8633 16.9962 15.0262 16.4989 15.1841C16.1183 15.3064 15.8748 15.4796 15.7479 15.6019C15.276 16.0655 15.2557 16.5698 15.4333 17.0283C15.5145 17.2474 15.7124 17.6549 16.3619 17.8637C19.173 18.7858 22.0298 19.5244 24.912 20.1102C19.31 20.4515 13.906 20.7623 8.21268 21.2462C5.42186 21.4857 1.58779 21.8627 1.12248 21.934C-0.0471278 22.1072 -0.00552301 23.2891 0.00208834 23.3553C0.0127442 23.4419 0.16142 24.4964 1.30363 24.476C37.3388 23.9208 73.3151 22.5301 109.373 22.4893C109.515 22.4893 119.181 22.5199 127.356 22.7288C123.961 22.9631 119.79 23.2025 114.832 23.4674C91.7548 24.7002 68.6366 25.3065 45.5945 27.2066C34.4211 28.1287 34.69 28.1286 23.679 29.4123C17.458 30.1357 17.732 30.0135 11.3755 31.0629C10.8148 31.1546 9.6619 31.0579 9.05654 31.1496C8.61762 31.2209 8.29996 31.3839 8.1107 31.5367C7.79762 31.7965 7.64084 32.1123 7.59872 32.4689C7.56269 32.7746 7.59822 33.1974 7.98842 33.6508C8.40197 34.1348 9.08343 34.5626 10.012 34.8734C11.0837 35.23 12.541 35.4593 14.2053 35.5815C20.2488 36.0298 29.22 35.1282 31.2954 35.1078C46.7971 34.9397 62.2735 33.9412 77.7753 33.554C77.7702 33.6406 77.7702 33.7221 77.7804 33.8037C77.8159 34.1348 77.9631 34.5169 78.369 34.848C78.7902 35.1842 80.0282 35.5968 81.6875 35.9126C83.2301 36.2081 85.1887 36.4935 87.0256 36.7634C84.7574 36.9672 82.3979 37.2168 80.8858 37.4817C80.2312 37.5989 78.5263 37.7772 78.2929 37.8689C77.5216 38.1745 77.4658 38.8061 77.4709 39.0863C77.4709 39.2443 77.5317 40.2529 78.7648 40.3752C89.38 41.4348 100.188 40.686 110.748 41.9902C111.443 42.0768 112.077 41.5825 112.163 40.8846C112.25 40.1867 111.757 39.5499 111.062 39.4633C105.592 38.7858 100.056 38.6585 94.5101 38.5464C95.1139 38.2306 95.3169 37.7465 95.3626 37.4205C95.4133 37.0282 95.3524 36.4934 94.7435 36.0298C94.4441 35.8005 93.7337 35.4796 92.4601 35.1434C90.7805 34.7002 87.1221 34.2366 84.0775 33.7476C85.0771 33.6202 86.0767 33.5031 87.0814 33.3961C94.6167 33.3197 103.568 33.2993 110.484 33.2738C116.091 33.2585 121.845 33.1923 123.083 33.1006C123.514 33.07 123.758 32.958 123.824 32.9275C124.093 32.7848 124.235 32.6013 124.321 32.4587C124.58 32.0308 124.585 31.603 124.347 31.17C124.306 31.0986 124.037 30.5739 123.18 30.4924C111.179 29.4022 98.9399 29.5652 86.9343 30.8541C85.1837 30.8693 83.5143 30.8948 81.9666 30.9202C65.0593 31.2055 48.1773 32.3773 31.27 32.5607C29.2758 32.5811 20.8425 33.4369 14.8904 33.0752C18.2292 32.5505 19.0462 32.5147 23.9732 31.9442C34.9386 30.6655 34.6697 30.6605 45.8026 29.7435C68.8193 27.8485 91.9172 27.2422 114.964 26.0094C128.482 25.286 136.281 24.7104 138.463 24.0023C139.453 23.6814 139.818 23.1058 139.914 22.7542C140.036 22.3365 139.99 21.8933 139.656 21.4552C139.564 21.338 139.407 21.1699 139.133 21.0374C140.807 21.0272 142.482 21.0221 144.156 21.017C158.953 20.9763 173.759 20.8591 188.551 20.9915C189.454 20.9966 190.357 21.0068 191.266 21.0221C198.618 21.2208 205.981 21.4042 213.338 21.5417L213.384 21.5469C216.337 21.5774 214.546 19.0303 213.465 18.9997C213.354 18.9946 212.582 18.9793 212.288 18.9691C210.187 18.908 208.087 18.8062 205.986 18.7552C201.094 18.638 196.188 18.531 191.291 18.475C154.356 17.4663 117.405 16.0094 80.4596 17.2524C66.2771 17.7313 52.0997 18.4445 37.9324 19.3054C32.2696 18.8775 26.6626 18.0777 21.1926 16.636C24.5111 15.7496 26.8808 15.2097 31.0366 14.3589C42.9306 11.9137 54.8499 10.1204 66.9164 8.77042C95.6011 5.57632 124.56 6.00939 153.209 2.58605C153.721 2.52492 153.95 2.3823 153.99 2.35174C154.579 1.96967 154.604 1.46526 154.564 1.12904C154.548 0.986401 154.391 0.0694548 153.341 0.00322952C152.97 -0.0222418 150.322 0.110224 149.297 0.145884C147.328 0.217203 145.354 0.319058 143.385 0.370001C135.672 0.573771 128.127 0.92023 120.414 1.31249C91.5011 2.77454 62.3953 4.75114 33.4214 4.65945C32.7212 4.65945 32.1529 5.23 32.1478 5.93301C32.1478 6.63092 32.7161 7.20657 33.4113 7.20657C43.169 7.23714 52.937 7.03846 62.7049 6.69715Z" fill="#A1A1AA" />
                                </svg>
                            </span>
                            <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                <path fill-rule="evenodd" clip-rule="evenodd" d="M12.9697 3.96967C13.2626 3.67678 13.7374 3.67678 14.0303 3.96967L21.5303 11.4697C21.671 11.6103 21.75 11.8011 21.75 12C21.75 12.1989 21.671 12.3897 21.5303 12.5303L14.0303 20.0303C13.7374 20.3232 13.2626 20.3232 12.9697 20.0303C12.6768 19.7374 12.6768 19.2626 12.9697 18.9697L19.1893 12.75H3C2.58579 12.75 2.25 12.4142 2.25 12C2.25 11.5858 2.58579 11.25 3 11.25H19.1893L12.9697 5.03033C12.6768 4.73744 12.6768 4.26256 12.9697 3.96967Z" fill="#27272A" />
                            </svg>
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <svg class="absolute bottom-0 left-0 z-0 pointer-events-none select-none w-[80%] h-auto" width="497" height="64" viewBox="0 0 497 64" fill="none" xmlns="http://www.w3.org/2000/svg">
            <path d="M-173 186.854C-173 163.618 -162.454 140.873 -143.028 119.503C-123.583 98.1125 -95.5934 78.5237 -61.8178 61.9064C5.7359 28.6703 95.0501 7.99997 181.136 7.99997C267.179 7.99996 344.686 28.6478 400.412 61.6135C456.316 94.6842 489 139.226 489 186.853C489 236.862 473.886 283.601 438.392 317.87C402.888 352.148 345.906 375 260.062 375C173.999 375 64.7587 352.014 -22.8612 316.22C-66.6696 298.323 -104.624 277.405 -131.478 254.905C-158.54 232.231 -173 209.108 -173 186.854Z" stroke="#FACC15" stroke-width="16" />
        </svg>
    </div>
<?php
    return ob_get_clean();
}

// Register the shortcode
add_shortcode('free_consultation', 'free_consultation_shortcode');

Using the code

Open the blog post where you want to offer the free consultation and decide where you want the Free Consultation block to appear and insert shortcode:

[free_consultation]

Conclusion

By integrating a free consultation shortcode into your WordPress blog post, you provide your readers with an easy and convenient way to engage with your business. This powerful feature can help you increase leads, build trust with potential clients, and ultimately boost your conversion rates. Don’t forget to track the performance of your free consultation offering to measure its success and make data-driven decisions for future improvements.

Give it a try in your next blog post and watch your engagement levels soar! Let us know in the comments how the free consultation shortcode is working for you!