Showing the Button

The Popup button can be shown using different methods. Example: Using a ShortCode, Calling a PHP function, Adding our action hook, Add our PHP function to your site’s hook.

The ShortCode

Just this ShortCode where you want to show the button that will show the popup. This ShortCode has some parameters that allow you to customize it. Check the ShortCode Parameters section for more about it.

[wpb-pcf-button]

PHP Function

You can call our PHP function to show the button. For example: you can call it on your site header.php file.

<?php wpb_pcf_contact_form_button(); ?>

Action Hook

Our action hook will also show the button, Just add this line of code where you need the button.

<?php do_action( 'wpb_pcf_contact_form_button' ); ?>

Adding the Button Function to Your Site’s Hook

You can also add our button function to any of your site’s hook. Here, for example, we are adding it to a WooCommerce product page.

<?php add_action( 'woocommerce_single_product_summary', 'wpb_pcf_contact_form_button', 30 );?>

Articles

Was this article helpful to you? No Yes

How can we help?