Load SweetAlert for Formidable Form 6
add_action( ‘frm_entries_footer_scripts’, ‘trigger_sweetalert_for_form_6’, 20, 2 ); function trigger_sweetalert_for_form_6( $fields, $form ) { if ( $form->id == 6 ) { ?>Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_action( ‘frm_entries_footer_scripts’, ‘trigger_sweetalert_for_form_6’, 20, 2 ); function trigger_sweetalert_for_form_6( $fields, $form ) { if ( $form->id == 6 ) { ?>Continue reading
// Compatibilizar FiboSearch Pro com HPOS (WooCommerce) add_action( ‘before_woocommerce_init’, function() { if ( class_exists( AutomatticWooCommerceUtilitiesFeaturesUtil::class ) ) { AutomatticWooCommerceUtilitiesFeaturesUtil::declare_compatibility( ‘custom_order_tables’, ‘ajax-search-for-woocommerce-premium/ajax-search-for-woocommerce.php’, true ); } });Continue reading
function custom_redirect_old_new_urls() { $redirect_urls = array( ‘/oldpage/’ => ‘/newpage/’, ‘/oldpage1/’ => ‘/newpage1/’, // Add more URLs here ); $request_uri = home_url( add_query_arg( array(), $_SERVER[‘REQUEST_URI’] ) ); foreach ( $redirect_urls as $old_url => $new_url ) { if ( untrailingslashit( $request_uri )…Continue reading
// Add Property Analyzer Demo to WordPress function addPropertyAnalyzerDemo() { // Only add on homepage or specific pages if (!is_home() && !is_page(‘home’) && !is_front_page()) return; // CSS Styles echo ‘ ‘; // HTML Structure echo ‘ 🏠 See Our AI…Continue reading
function wpcode_snippet_add_slug_body_class( $classes ) { global $post; if ( isset( $post ) ) { $classes[] = $post->post_type . ‘-‘ . $post->post_name; } return $classes; } add_filter( ‘body_class’, ‘wpcode_snippet_add_slug_body_class’ );Continue reading
function ruki_exclude_children_of_excluded_categories($query) { if ($query->is_home() && $query->is_main_query()) { $excluded = $query->get(‘category__not_in’); // Only proceed if exclusions exist if (!empty($excluded) && is_array($excluded)) { $all_excluded = $excluded; // Loop through each excluded parent to find children foreach ($excluded as $cat_id) { $child_ids…Continue reading
add_action(‘frm_after_create_entry’, ‘link_fields’, 1123, 22); add_action(‘frm_after_update_entry’, ‘link_fields’, 2, 146); function link_fields($entry_id, $form_id){ if($form_id ==22 global $wpdb; $first_field = $_POST[‘item_meta’][22]; $user = $wpdb->get_var($wpdb->prepare(“SELECT user_id FROM “. $wpdb->prefix .”frm_items WHERE id=%d”, $entry_id)); $entry_ids = $wpdb->get_col(“Select id from “. $wpdb->prefix .”frm_items where form_id=’2′ and…Continue reading
$post_id = get_the_ID(); if (!$post_id) return; // Exit if no post ID // Basic attorney info $attorney_data = []; // Basic Information with null checks $attorney_data = [ ‘name’ => get_field(‘attorney_name’, $post_id) ?: ”, ‘honorificSuffix’ => get_field(‘honorificSuffix’, $post_id) ?: ”,…Continue reading
$post_id = get_the_ID(); if (!$post_id) return; // Exit if no post ID // Basic attorney info $attorney_data = []; // Basic Information with null checks $attorney_data = [ ‘name’ => get_field(‘attorney_name’, $post_id) ?: ”, ‘honorificSuffix’ => get_field(‘honorificSuffix’, $post_id) ?: ”,…Continue reading
// Basic author information $author_id = get_the_author_meta(‘ID’); $author = [ ‘givenname’ => get_field(‘author_givenname’, ‘user_’.$author_id), ‘familyname’ => get_field(‘author_familyname’, ‘user_’.$author_id), ‘middlename’ => get_field(‘author_middlename’, ‘user_’.$author_id), ‘prefix’ => get_field(‘author_prefix’, ‘user_’.$author_id), ‘suffix’ => get_field(‘author_suffix’, ‘user_’.$author_id), ‘gender’ => get_field(‘author_gender’, ‘user_’.$author_id), ‘description’ => get_field(‘author_description’, ‘user_’.$author_id), ‘website’ =>…Continue reading