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

Allow SVG Files Upload (copy)

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading

Allow SVG Files Upload (copy)

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading

ACF option field shortcode

function acf_option_field_shortcode( $atts ) { // Definimos los atributos por defecto (solo necesitamos ‘field’) $atts = shortcode_atts( array( ‘field’ => ”, // Clave del campo a obtener ), $atts, ‘opcion_acf’ ); // Aseguramos que se ha proporcionado un nombre de…Continue reading

RankMath – Remove All Default Schema (Prevent Duplicates)

add_filter( ‘rank_math/json_ld’, function( $data, $jsonld ) { if ( isset( $data[‘publisher’] ) ) { unset( $data[‘publisher’] ); } unset( $data[‘WebPage’] ); unset( $data[‘ProfilePage’] ); unset( $data[‘place’] ); unset( $data[‘WebSite’] ); unset( $data[‘primaryImage’] ); return $data; }, 99, 2 );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