Compatibilizar FiboSearch Pro com HPOS

// 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

Redirect from Array

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

Property Analyzer Demo

// 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

Add the Page Slug to Body Class

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

Exclude Child Categories When Excluding Parent

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

SEO Ready™ – ACF: Attorney Snippet (NLF)

$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

SEO Ready™ – ACF: Attorney Snippet

$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

SEO Ready™ – ACF: Author Snippet

// 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

ACF: Article

function generate_article_schema() { global $post; $author_id = ‘user_’ . get_the_author_meta(‘ID’); $org_url = get_field(‘org_url’, $author_id); // Determine if this is a BlogPosting or Article $post_type = (get_post_type() === ‘post’) ? ‘BlogPosting’ : ‘Article’; $schema = [ “@context” => “https://schema.org”, “@type” =>…Continue reading