Disable REST API Links

remove_action( ‘xmlrpc_rsd_apis’, ‘rest_output_rsd’ ); remove_action( ‘wp_head’, ‘rest_output_link_wp_head’ ); remove_action( ‘template_redirect’, ‘rest_output_link_header’, 11 );Continue reading

Add Featured Image Column

add_filter( ‘manage_posts_columns’, function ( $columns ) { // You can change this to any other position by changing ‘title’ to the name of the column you want to put it after. $move_after = ‘title’; $move_after_key = array_search( $move_after, array_keys( $columns…Continue reading

Set a minimum, and maximum price for products

add_filter( ‘wcv_product_price’, ‘price_min_max’ ); function price_min_max( $args ) { $args[‘custom_attributes’] = array( ‘min’ => 3, ‘max’ => 200, ‘data-parsley-type’ => ‘number’, ‘data-parsley-range-message’ => __( ‘Price must be between 3 and 200’, ‘wcvendors-pro’ ), ‘pattern’ => ‘\d*’, ); return $args; }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