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

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

BRICKS – Admin Quick Nav

/** * Plugin Name: MA Admin Quick Nav * Description: Admin Bar Quick Navigation for Post Types * Version: 2.0.2 * Author: Matthias Altmann * Author URI: https://www.altmann.de/ * Copyright: © 2024-2026, Matthias Altmann * Requires at least: 5.8 *…Continue reading

Single product – Cross sell as related products

// Stap 1: Verwijder de standaard related products remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_related_products’, 20 ); // Stap 2: Toon cross-sells aangevuld met related products tot totaal van 4 add_action( ‘woocommerce_after_single_product_summary’, function() { global $product; if ( ! $product || ! is_a( $product,…Continue reading

MetaBox – PHP Fonctions pour les templates

// get_mb_relationships_dat // Pour l’appeler dans le code : // —— // Exemple 1 // En haut de fichier // {% set prefectures_liees = mb.get_mb_relationships_data(post.ID, ‘tsunami_to_prefectures’, ‘prefecture’, ‘from’, [‘code_pref’, ‘population’]) %} // Puis, pour l’affichage // {% set pref_textes =…Continue reading

COMPROBACIÓN DATOS ORLA + POPUP + INCIDENCIAS UNIFICADO

// === TECNOFOTO – COMPROBACIÓN DATOS ORLA + EDICIÓN + POPUP + INCIDENCIAS === // Página /comprobacion-de-datos con shortcode: [comprobacion_datos_orla] if (!defined(‘ABSPATH’)) exit; /* ========================================================= * 0) Proteger página /comprobacion-de-datos solo para logueados * ======================================================= */ add_action(‘template_redirect’, function () {…Continue reading

[IN PROGRESS] Inject data-product-tags into all products

add_action(‘woocommerce_before_single_product’, function () { global $post; if (!is_product()) return; $product = wc_get_product($post->ID); if (!$product) return; $tags = wp_get_post_terms($post->ID, ‘product_tag’, [‘fields’ => ‘names’]); $tag_string = !empty($tags) ? esc_attr(implode(‘, ‘, $tags)) : ”; echo ‘Continue reading