// filepath: functions.php // Hook into ACF to dynamically populate the ‘vestiging’ select field for Medewerkers add_filter(‘acf/load_field/name=vestiging’, ‘populate_vestiging_field_for_medewerkers’); function populate_vestiging_field_for_medewerkers($field) { // Reset choices $field[‘choices’] = []; // Query the ‘Vestigingen’ custom post type $vestigingen = get_posts([ ‘post_type’ => ‘vestigingen’,…Continue reading
// Hook into ACF to dynamically populate the ‘vestiging’ select field add_filter(‘acf/load_field/name=vestiging’, ‘populate_vestiging_field’); function populate_vestiging_field($field) { // Reset choices $field[‘choices’] = []; // Query the ‘Vestigingen’ custom post type $vestigingen = get_posts([ ‘post_type’ => ‘vestigingen’, // Custom post type slug…Continue reading
/** * Add Sortable Post ID Column Before Author in Admin List View */ function add_sortable_post_id_before_author_column($columns) { $new_columns = array(); foreach ($columns as $key => $value) { if ($key === ‘author’) { $new_columns[‘post_id’] = ‘ID’; } $new_columns[$key] = $value; }…Continue reading
/** * Availability Date Functionality * * Adds a custom availability date field to WooCommerce products and variations, * and includes it in product feeds with proper formatting. */ if (!defined(‘ABSPATH’)) { exit; } /** * Format availability date to…Continue reading
function innsiders_lazyload_borlabs_script() { if (is_admin()) return; ?>Continue reading
// Registreer Custom Post Type: Vacatures function maak_vacatures_post_type() { $labels = array( ‘name’ => _x(‘Vacatures’, ‘Post Type Algemene Naam’, ‘textdomain’), ‘singular_name’ => _x(‘Vacature’, ‘Post Type Enkelvoudige Naam’, ‘textdomain’), ‘menu_name’ => __(‘Vacatures’, ‘textdomain’), ‘name_admin_bar’ => __(‘Vacature’, ‘textdomain’), ‘add_new_item’ => __(‘Nieuwe vacature…Continue reading
function rename_posts_to_nieuws() { global $menu, $submenu, $wp_post_types; // Rename menu item $menu[5][0] = ‘Blog’; $submenu[‘edit.php’][5][0] = ‘Alle blogposts’; $submenu[‘edit.php’][10][0] = ‘Nieuwe blogpost’; // Rename post object labels $labels = &$wp_post_types[‘post’]->labels; $labels->name = ‘Blog’; $labels->singular_name = ‘Blogpost’; $labels->add_new = ‘Nieuwe blogpost’;…Continue reading
// Registreer Custom Post Type: Vestigingen function registreer_vestigingen_post_type() { $labels = array( ‘name’ => _x(‘Vestigingen’, ‘Post Type Algemene Naam’, ‘textdomain’), ‘singular_name’ => _x(‘Vestiging’, ‘Post Type Enkelvoudige Naam’, ‘textdomain’), ‘menu_name’ => __(‘Vestigingen’, ‘textdomain’), ‘name_admin_bar’ => __(‘Vestiging’, ‘textdomain’), ‘archives’ => __(‘Vestiging archieven’,…Continue reading
// Registreer Custom Post Type: Afdelingen function registreer_afdelingen_post_type() { $labels = array( ‘name’ => _x(‘Afdelingen’, ‘Post Type Algemene Naam’, ‘textdomain’), ‘singular_name’ => _x(‘Afdeling’, ‘Post Type Enkelvoudige Naam’, ‘textdomain’), ‘menu_name’ => __(‘Afdelingen’, ‘textdomain’), ‘name_admin_bar’ => __(‘Afdeling’, ‘textdomain’), ‘archives’ => __(‘Afdeling archieven’,…Continue reading