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

Modify the LLMS Description for a Specific Post

add_filter( ‘aioseo_llms_post_description’, ‘aioseo_filter_llms_post_description’, 10, 2 ); function aioseo_filter_llms_post_description( $description, $post = null ) { if ( is_a( $post, ‘WP_Post’ ) && 14 === $post->ID ) { $description = ‘This is a featured post. ‘ . $description; } return $description; }Continue reading

Add Taxonomy Label to LLMS Term Titles

add_filter( ‘aioseo_llms_term_title’, ‘aioseo_filter_llms_term_title’, 10, 2 ); function aioseo_filter_llms_term_title( $title, $term = null ) { if ( is_a( $term, ‘WP_Term’ ) ) { $taxonomy = get_taxonomy( $term->taxonomy ); if ( $taxonomy ) { $title = $taxonomy->labels->singular_name . ‘: ‘ . $title;…Continue reading

Modify LLMS Title for a Specific Post

add_filter( ‘aioseo_llms_post_title’, ‘aioseo_filter_llms_post_title’, 10, 2 ); function aioseo_filter_llms_post_title( $title, $post = null ) { if ( is_a( $post, ‘WP_Post’ ) && 14 === $post->ID ) { $title = ‘Featured: ‘ . $title; } return $title; }Continue reading

Fully Disable Comments & Trackbacks (The “Nuclear” Option)

/** * Fully Disable Comments & Trackbacks (The “Nuclear” Option) * Optimized for performance and UI clarity. */ add_action(‘admin_init’, function () { global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); foreach (get_post_types() as $post_type) {…Continue reading

Disable Unused Auto-Generated Image Sizes

/** * Disable Unused Auto-Generated Image Sizes * Optimized for AWS Storage savings & Performance. */ add_filter(‘intermediate_image_sizes_advanced’, function ($sizes) { // Standard sizes often needed by Bricks/Kadence – Leave un-commented if needed // unset($sizes[‘thumbnail’]); // unset($sizes[‘medium’]); // unset($sizes[‘large’]); // High-bloat…Continue reading

Elementor LCP Image Preloader

/** * Elementor LCP Background Image Preloader v2.1 * * Extracts the EXACT URL from Elementor’s _elementor_data JSON * This ensures the preloaded URL matches what Elementor’s CSS requests * * WPCODE SETUP: * – Code Type: PHP Snippet *…Continue reading

Elementor LCP Font Preloader

/** * Critical Font Preloader for Elementor Sites v1.1 * Dynamically detects and preloads locally-hosted fonts */ if (!defined(‘ABSPATH’)) exit; define(‘CFPL_CACHE_DURATION’, 86400); define(‘CFPL_MAX_FONTS’, 6); define(‘CFPL_PRELOAD_EICONS’, true); add_action(‘wp_head’, ‘cfpl_output_font_preloads’, 1); function cfpl_output_font_preloads() { if (is_admin()) { return; } $cache_key = ‘cfpl_fonts_v1’;…Continue reading

WPCode Snippet: MU-Plugins Sync Engine

/** * WPCode Snippet: MU-Plugins Sync Engine * Description: Synchronizes MU-Plugins FROM /wp-content/mu-plugins/ TO wpcode_snippets_sync CPT * Location: Run Everywhere * Priority: 25 * * INSTALL ORDER: #6 – Install AFTER the WPCode sync system is fully set up *…Continue reading