Add Custom Tab – V2

/** * Add a custom product data tab */ add_filter( ‘woocommerce_product_tabs’, ‘woo_new_product_tab’ ); function woo_new_product_tab( $tabs ) { // Adds the new tab $tabs[‘test_tab’] = array( ‘title’ => __( ‘New Product Tab’, ‘woocommerce’ ), ‘priority’ => 50, ‘callback’ => ‘woo_new_product_tab_content’…Continue reading

WooCommerce Change “$0.00” to “Free”

/** * Snippet Name: WooCommerce Change “$0.00” to “Free” * Snippet Author: ecommercehints.com */ add_filter( ‘woocommerce_get_price_html’, ‘ecommercehints_change_zero_price_display’, 10, 2 ); function ecommercehints_change_zero_price_display( $price, $product ) { if (empty($product->get_price()) || $product->get_price() == 0) { // If price is not entered or…Continue reading

Add a color picker field in Formidable Forms

function frm_default_custom_scripts( $scripts ){ $scripts->add( ‘iris’, ‘/wp-admin/js/iris.min.js’, array( ‘jquery-ui-draggable’, ‘jquery-ui-slider’, ‘jquery-touch-punch’ ), ‘1.1.1’, 1 ); $scripts->add( ‘wp-color-picker’, “/wp-admin/js/color-picker.js”, array( ‘iris’ ), false, 1 ); $scripts->set_translations( ‘wp-color-picker’ ); $custom_css = ‘.frm-color-picker .button.wp-color-result{border-radius: var(–border-radius) !important}’ . ‘.frm-color-picker .wp-picker-container{position:relative}’ . ‘.frm-color-picker .wp-picker-clear, .frm-color-picker…Continue reading

Child Support Calculator

function child_support_calculator_shortcode() { // Enqueue the JavaScript wp_enqueue_script(‘child-support-calculator’, get_template_directory_uri() . ‘/path-to-your-js-folder/child-support-calculator.js’, array(‘jquery’), ‘1.0.0’, true); ob_start(); include get_template_directory() . ‘/path-to-your-html-folder/child-support-form.html’; return ob_get_clean(); } add_shortcode(‘child_support_calculator’, ‘child_support_calculator_shortcode’); Javascript document.addEventListener(“DOMContentLoaded”, function() { document.getElementById(“childSupportForm”).addEventListener(“submit”, function(event) { event.preventDefault(); const grossIncome = parseFloat(document.getElementById(“grossIncome”).value); let numChildren = parseInt(document.getElementById(“numChildren”).value);…Continue reading

Freshdesk Support Widget

function add_freshworks_embed_code_script_in_admin() { echo ““; echo ““; } add_action( ‘admin_footer’, ‘add_freshworks_embed_code_script_in_admin’ );Continue reading

Section – Profile4 – Image / Text split

Meet[ph_primary field=”first_name”] [ph_primary field=”last_name”] [ph_primary field=”first_name”] [ph_primary field=”last_name”] is one of the leading real estate agents and has been named the Top Agent in Napa, CA since 2015. [ph_primary field=”first_name”] represents some of the finest estates in the Napa area…Continue reading