// Sticky Tag Post / Kiri Vadivelu / 2026 add_action(‘pre_get_posts’, function($query) { if (!is_admin() && $query->is_main_query() && is_tag()) { $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_tag()) { global $wpdb;…Continue reading
/** * DVA – WooCommerce breadcrumbs * Versie 1.3 * * Doel: * * GEWONE WORDPRESS-PAGINA’S * – Huidige pagina blijft zichtbaar. * – Parent /letters-cijfers/ wordt weergegeven als: * “Letters & Cijfers” * – Parent /baby-kinderkleding/ wordt weergegeven als:…Continue reading
// Search Exclude Page / Kiri Vadivelu / 2026 add_action(‘pre_get_posts’, ‘exclude_page_search’); function exclude_page_search($query) { if (!is_admin() && $query->is_main_query() && $query->is_search) { $query->set(‘post_type’, ‘post’); } }Continue reading
// Search Exclude Tag / Kiri Vadivelu / 2026 function exclude_tag_search( $query ) { if ( $query->is_search && ! is_admin() ) { $query->set( ‘tag__not_in’, array( 8, 9 ) ); // Replace with your tag IDs } return $query; } add_filter(…Continue reading
// Search Exclude Category / Kiri Vadivelu / 2026 function exclude_categories_from_search( $query ) { if ( ! is_admin() && $query->is_search && $query->is_main_query() ) { // Replace with your negative category IDs $query->set( ‘cat’, ‘-1,-2’ ); } } add_action( ‘pre_get_posts’, ‘exclude_categories_from_search’…Continue reading
// Advanced Search Filter / Kiri Vadivelu / 2026 function advanced_search_filter( $query ) { // Only modify the main query on the front-end search results if ( ! is_admin() && $query->is_main_query() && $query->is_search() ) { // Check if category_name is…Continue reading
/** * Popup temporaneo – Avviso sospensione spedizioni * WPCode – PHP Snippet */ add_action(‘wp_footer’, function () { // Data oltre la quale il popup non viene più mostrato. // Formato: YYYY-MM-DD $scadenza = ‘2026-10-05’; if (current_time(‘Y-m-d’) > $scadenza) {…Continue reading
/** * PG Sideload Guard — TEMPORARY. Installed 2026-09-15. * * ══════════════════════════════════════════════════════════════════════ * THIS IS A TOURNIQUET. IT IS MEANT TO BE DEACTIVATED. * ══════════════════════════════════════════════════════════════════════ * * WHAT IT DOES: blocks front-end HTTP requests for image files. Nothing else. *…Continue reading
add_action( ‘wp_enqueue_scripts’, function() { if ( ! class_exists( ‘FrmRegGlobalSettings’ ) || ! class_exists( ‘FrmProAppController’ ) ) { return; } $global_settings = new FrmRegGlobalSettings(); $reset_page_id = (int) $global_settings->get_global_page( ‘resetpass_page’ ); if ( ! $reset_page_id || ! is_page( $reset_page_id ) ) {…Continue reading
remove_action( ‘wp_footer’, ‘wpcomsh_footer_rum_js’ ); // remove frontend // remove_action( ‘admin_footer’, ‘wpcomsh_footer_rum_js’ ); // remove backendContinue reading