Create Estimated 5* Google Reviews Count Shortcodes & Action Hooks for Rich Showcase for Google Reviews Plugin

if (!function_exists(‘rd_rr_table_exists’)) { function rd_rr_table_exists(string $table): bool { global $wpdb; $found = $wpdb->get_var($wpdb->prepare(“SHOW TABLES LIKE %s”, $table)); return !empty($found); } } if (!function_exists(‘rd_rr_round_down_step’)) { function rd_rr_round_down_step(int $value, int $step): int { if ($step prefix . ‘grp_google_stats’; if (!rd_rr_table_exists($stats_table)) { return…Continue reading

Create Woo Customer Count Shortcodes & Action Hooks

if (!function_exists(‘rd_wc_customer_count_get’)) { function rd_wc_customer_count_get(array $args = array()): int { if (!function_exists(‘WC’)) { return 0; } global $wpdb; $defaults = array( ‘scope’ => ‘all’, ‘registered_only’ => false, ‘roles’ => array(‘customer’), ‘require_role’ => false, ); $args = array_merge($defaults, $args); $scope =…Continue reading

Registro de Widget Personalizado – Lista Dinámica ACF

/** * Registro de Widget Personalizado – Lista Dinámica ACF * Este widget extrae datos de campos repetidores de ACF y permite un diseño profesional. */ add_action( ‘elementor/widgets/register’, function( $widgets_manager ) { class Mi_Widget_Lista_Dinamica extends \Elementor\Widget_Base { /** * Configuración…Continue reading

Append Post Count to Category Descriptions in LLMS Files

add_filter( ‘aioseo_llms_term_description’, ‘aioseo_filter_llms_term_description’, 10, 2 ); function aioseo_filter_llms_term_description( $description, $term = null ) { if ( is_a( $term, ‘WP_Term’ ) && ‘category’ === $term->taxonomy && $term->count > 0 ) { $description .= ‘ This category contains ‘ . $term->count .…Continue reading

Remove the LLMS Description for a Specific Post

add_filter( ‘aioseo_llms_post_description’, ‘aioseo_filter_remove_llms_post_description’, 10, 2 ); function aioseo_filter_remove_llms_post_description( $description, $post = null ) { if ( is_a( $post, ‘WP_Post’ ) && 14 === $post->ID ) { return ”; } return $description; }Continue reading