// Turn off the random content redirects added in WordPress 7.2 (/random/, /random/category/news/, ?random). add_filter( ‘wp_enable_random_content_redirect’, ‘__return_false’ ); // The /random/ URLs are stored rewrite rules, so rebuild them once if any are still there. add_action( ‘init’, function () {…Continue reading
add_action(‘pre_get_posts’, function($query) { if (!is_admin() && $query->is_main_query() && is_category()) { $sticky_posts = get_option(‘sticky_posts’); if (!empty($sticky_posts)) { add_filter(‘posts_orderby’, function($orderby, $query) use ($sticky_posts) { if (!is_admin() && $query->is_main_query() && is_category()) { global $wpdb; $sticky_list = implode(‘,’, array_map(‘intval’, $sticky_posts)); return “FIELD({$wpdb->posts}.ID, {$sticky_list}) DESC,…Continue reading
add_action( ‘phpmailer_init’, ‘mijn_eigen_smtp_instellingen’ ); function mijn_eigen_smtp_instellingen( $phpmailer ) { $phpmailer->isSMTP(); $phpmailer->Host = ‘mail.devierambachten.com’; // De hostnaam van je eigen server $phpmailer->SMTPAuth = true; $phpmailer->Port = 587; // 587 voor TLS, of 465 voor SSL $phpmailer->Username = ‘[email protected]’; // Je mailbox…Continue reading
/** * PRO Adminpagina: volledige ACF controle * + Filterknoppen * + Zoekveld * + Kolommen inklapbaar * + PDF-export * (Bulk-fix verwijderd) */ add_action(‘admin_menu’, function() { add_menu_page( ‘ACF Productcontrole’, ‘Productcontrole (ACF)’, ‘edit_products’, ‘dv-acf-pro-check’, ‘dv_acf_pro_check_page’, ‘dashicons-visibility’, 26 ); }); /*…Continue reading
/** * CCT – názov termu podľa ID fallback od Gruppa Taxonomy * Callback pre JetEngine Dynamic Field. Prevedie uložené _ID z CCT “terms” na názvy (22 → Tenis), * pri viacerých hodnotách ich oddelí čiarkou. * Závisí od: JetEngine…Continue reading
// Prevent automatic redirects for post and taxonomy URL changes. add_filter( ‘Yoast\WP\SEO\post_redirect_slug_change’, ‘__return_true’ ); add_filter( ‘Yoast\WP\SEO\term_redirect_slug_change’, ‘__return_true’ ); // Suppress redirect notices for URL changes, deletion and restoration. add_filter( ‘Yoast\WP\SEO\enable_notification_post_slug_change’, ‘__return_false’ ); add_filter( ‘Yoast\WP\SEO\enable_notification_term_slug_change’, ‘__return_false’ ); add_filter( ‘Yoast\WP\SEO\enable_notification_post_trash’, ‘__return_false’ );…Continue reading
/** * lokalstolz | Grundschutz * Version 1.0.0 (16.11.2026) * * Kleiner Schutz auf WordPress-Ebene fuer Seiten, deren Server wir nicht selbst verwalten: * – XML-RPC aus (beliebter Weg fuer Passwort-Raten) * – Benutzerliste der REST-Schnittstelle (wp/v2/users) nur fuer angemeldete…Continue reading
/* * WPCode-Snippet “lokalstolz | Keine Google Fonts” (Typ php, Location everywhere, Auto-Insert an) * Grundsatz [Martin 16.11.2026]: Schriften immer vom eigenen Server, nie von Google, in allen Projekten. * Oxygen 6 / Breakdance hat dafuer keinen Schalter in den…Continue reading