Custom Availability Date for Products

/** * 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

Enqueue Child Theme’s CSS & Additional CSS in WordPress Editor

/* Enqueue Child Theme style.css to editor */ add_filter(‘block_editor_settings_all’, function($editor_settings) { // Get the URL of the child theme’s style.css $child_theme_style_url = get_stylesheet_directory_uri() . ‘/style.css’; $editor_settings[‘styles’][] = array(‘css’ => wp_remote_get($child_theme_style_url)[‘body’]); return $editor_settings; }); /* Eunqueue Customizer CSS to editor */…Continue reading

Vacatures CPT – met taxonomies

// 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

Berichten -> Blog

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

Display Roster Entry

/** Display Roster Entry **/ // FOR DEBUGGING ONLY //$data = serialize(array(“Red”, “Green”, “Blue”)); //echo $data . ““; // //$test = unserialize($data); //var_dump($test); // $profile_id = um_profile_id(); $user = get_user($profile_id); $email = $user->email; //FOR DEBUGGING ONLY: // $email = “[email protected]”;…Continue reading

Vestigingen CPT

// 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

Afdelingen CPT

// 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