/** Adds script to header ** Scroll to top of page – only on Pager facet interaction ** For more info see: ** https://facetwp.com/help-center/facets/facet-types/pager/#how-to-add-pagination-scrolling **/ add_action( ‘wp_head’, function() { ?>Continue reading
add_filter( ‘rank_math/frontend/breadcrumb/items’, function( $crumbs, $class ) { //Adding to single products // change to match the post type name $value[] = array( ‘Shop’, // change to the actual name shown on the frontend ‘/shop/’, // change to the actual URL…Continue reading
class PIM_Metaboxes { public function __construct() { add_action( ‘admin_init’, array($this, ‘add_metaboxes’) ); add_action( ‘save_post’, array($this, ‘save_metabox_data’), 10 , 3 ); add_action( ‘admin_enqueue_scripts’, array($this, ‘category_enqueue_scripts’) ); add_action(‘pa_brand_add_form_fields’, array($this, ‘add_pa_brand_fields’), 10, 2 ); add_action(‘pa_brand_edit_form_fields’, array($this, ‘edit_pa_brand_fields’), 10, 2 ); // Voor pa_merk…Continue reading
/** * WPCode Snippet: Expose GravityView ACF Fields to REST API (Application Password Auth Required) * Description: Makes ALL GravityView data accessible ONLY via Application Password authentication * Location: Run Everywhere * Priority: 15 */ defined( ‘ABSPATH’ ) || exit;…Continue reading
/** * WPCode Snippet: Auto-Populate GravityView Field Details on CPT Sync * Location: Run Everywhere * Priority: 30 * Description: Hooks into GravityView sync to populate detailed field information */ defined( ‘ABSPATH’ ) || exit; /** * Hook into GravityView…Continue reading
/** * WPCode Snippet: GravityView Views ACF Fields * Description: Registers ACF fields for GravityView configurations and settings * Location: Run Everywhere * Priority: 10 */ defined( ‘ABSPATH’ ) || exit; add_action( ‘acf/init’, function() { if ( ! function_exists( ‘acf_add_local_field_group’…Continue reading
/** * WPCode Snippet: GravityView Views CPT Registration * Description: Registers custom post type for GravityView with full REST API support * Location: Run Everywhere * Priority: 0 */ defined( ‘ABSPATH’ ) || exit; add_action( ‘init’, function() { $labels =…Continue reading
// Register shortcodes add_shortcode(‘lol_nmdisp’, ‘lol_nmdisp_shortcode’); add_shortcode(‘lol_ctry’, ‘lol_ctry_shortcode’); add_shortcode(‘lol_pop’, ‘lol_pop_shortcode’); add_shortcode(‘lol_spidesc’, ‘lol_spidesc_shortcode’); add_shortcode(‘lol_lpidesc’, ‘lol_lpidesc_shortcode’); add_shortcode(‘lol_peopledesc’, ‘lol_peopledesc_shortcode’); add_shortcode(‘lol_rlgn’, ‘lol_rlgn_shortcode’); add_shortcode(‘lol_lang’, ‘lol_lang_shortcode’); add_shortcode(‘lol_pgid’, ‘lol_pgid_shortcode’); function lol_nmdisp_shortcode() { $data = get_current_week_people_data(); return esc_html($data[‘NmDisp’] ?? ‘[Missing: NmDisp]’); } function lol_ctry_shortcode() { $data = get_current_week_people_data(); return…Continue reading
function shortcode_merken_logos() { // Probeer eerst ‘pa_brand’ $terms = get_terms(array( ‘taxonomy’ => ‘pa_brand’, ‘hide_empty’ => false, )); // Als ‘pa_brand’ leeg is of niet bestaat, gebruik ‘pa_merk’ if (empty($terms) || is_wp_error($terms)) { $terms = get_terms(array( ‘taxonomy’ => ‘pa_merk’, ‘hide_empty’ =>…Continue reading