Allow SVG Files Upload

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

Yoast OG‑title altijd gelijk is aan de SEO‑titel.

add_filter( ‘wpseo_opengraph_title’, function( $og_title ) { // Gebruik altijd de Yoast SEO-titel als OG-title if ( function_exists( ‘wpseo_replace_vars’ ) ) { $title = wpseo_replace_vars( WPSEO_Meta::get_value( ‘title’ ), get_post() ); if ( ! empty( $title ) ) { return $title; }…Continue reading

Podcast RSS Feed

add_action( ‘wp_enqueue_scripts’, function() { wp_add_inline_script( ‘jquery’, ‘ jQuery(document).on(“click”, “.uvri-tab-btn”, function() { jQuery(“.uvri-tab-btn”).removeClass(“active”); jQuery(“.uvri-tab-panel”).removeClass(“active”); jQuery(this).addClass(“active”); jQuery(“#” + jQuery(this).data(“tab”)).addClass(“active”); }); ‘ ); } ); function uvri_podcast_episodes_shortcode() { $year_season = array( 2023 => 1, 2024 => 2, 2025 => 3, 2026 => 4,…Continue reading

Grab Excerpt Field for Three Boxes Homepage

add_filter( ‘get_the_excerpt’, function( $excerpt ) { remove_filter( ‘the_content’, array( SiteOrigin_Panels::single(), ‘generate_post_content’ ) ); return $excerpt; } ); add_filter( ‘the_content’, function( $content ) { add_filter( ‘the_content’, array( SiteOrigin_Panels::single(), ‘generate_post_content’ ) ); return $content; }, 11 );Continue reading

Completely Disable Comments (copy)

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading