// Schema Single Post / Kiri Vadivelu / 2026 add_action(‘wp_head’, ‘schema_single_post’); function schema_single_post() { if ( ! is_single() ) return; $schema = [ ‘@context’ => ‘https://schema.org’, ‘@type’ => ‘Article’, ‘headline’ => get_the_title(), ‘author’ => [‘@type’ => ‘Person’, ‘name’ => get_the_author()],…Continue reading
// Open Graph Meta / Kiri Vadivelu / 2026 function open_graph_meta() { if (is_singular()) { global $post; $title = get_the_title(); $description = has_excerpt() ? get_the_excerpt() : wp_trim_words($post->post_content, 30); $url = get_permalink(); $image = get_the_post_thumbnail_url($post->ID, ‘large’); $site_name = get_bloginfo(‘name’); echo ‘‘…Continue reading
// Remove Admin Help / Kiri Vadivelu / 2026 add_action( ‘admin_head’, ‘remove_admin_help_tabs’ ); function remove_admin_help_tabs() { $screen = get_current_screen(); if ( $screen ) { $screen->remove_help_tabs(); } }Continue reading
// Custom Screen Option / Kiri Vadivelu / 2026 function custom_screen_option() { if ( get_current_user_id() !== 1 ) { // Replace your ID return false; } return true; } add_filter( ‘screen_options_show_screen’, ‘custom_screen_option’ );Continue reading
// Remove Dashboard Widget / Kiri Vadivelu / 2026 add_action( ‘wp_dashboard_setup’, ‘remove_dashboard_widget’ ); function remove_dashboard_widget() { // Remove specific widgets by their ID and section remove_meta_box( ‘dashboard_right_now’, ‘dashboard’, ‘normal’ ); // At a Glance remove_meta_box( ‘dashboard_activity’, ‘dashboard’, ‘normal’ ); //…Continue reading
/** * WPCode-Snippet: lokalstolz | Sperrseite Developing * * Gestaltet die Sperrseite des Plugins “Password Protected” (Saad Iqbal / WPExperts) * im lokalstolz-Look: dunkler Hintergrund, weisses Logo, Hinweistext. * * – Nutzt nur die offiziellen Haken der kostenlosen Plugin-Version (geprueft…Continue reading
// Contributor Default Role / Kiri Vadivelu / 2026 function contributor_default_role( $default_role ) { return ‘contributor’; // Replace your choice } add_filter( ‘pre_option_default_role’, ‘contributor_default_role’ );Continue reading
/* * WPCode-Snippet “lokalstolz | Bildmasse ergaenzen” (Typ php, Location everywhere, Auto-Insert an, Prioritaet 10) * Oxygen 6 gibt an Bildern kein width und height aus. Lighthouse meldet dann “Image elements do not have explicit * width and height”, der…Continue reading
/** * FC – [*] – Imágenes optimizadas al subir (snippet de WPCode, tipo PHP, «Run Everywhere»). * * Al subir una imagen a la biblioteca de medios, WordPress genera sus tamaños * (miniatura, medio, grande…). Con este snippet: *…Continue reading
add_action( ‘admin_notices’, function () { $state = ( defined( ‘WP_DEBUG’ ) && WP_DEBUG ) ? ‘enabled’ : ‘disabled’; echo ‘ WP_DEBUG is ‘ . esc_html( $state ) . ‘. ‘; } );Continue reading