Location: everywhere
Borlabs Cookie für Bots sperren
function innsiders_lazyload_borlabs_script() { if (is_admin()) return; ?>Continue reading
Vacatures CPT
// 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
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
Medewerkers / collega’s CPT
// Register a Custom Post Type called “Medewerkers” (plural) and “Medewerker” (singular) function medewerkers_post_type() { $labels = array( ‘name’ => _x( ‘Medewerkers’, ‘post type general name’, ‘textdomain’ ), ‘singular_name’ => _x( ‘Medewerker’, ‘post type singular name’, ‘textdomain’ ), ‘menu_name’ =>…Continue reading
MemberPress: Code Blocks Pro – Load All Currently Enqueued Styles In the Courses ReadyLaunch Template
function my_theme_enqueue_scripts() { wp_enqueue_style( ‘code-block’, ‘https://yourdomain.com/wp-content/plugins/code-block-pro/src/front/style.css’, [], ‘1.0.0’, ‘all’ ); wp_enqueue_style( ‘code-block-font’, ‘https://yourdomain.com/wp-content/plugins/code-block-pro/build/fonts/Code-Pro-JetBrains-Mono-NL.ttf’, [], ‘1.0.0’, ‘all’ ); wp_enqueue_style( ‘code-block-css’, ‘https://yourdomain.com/wp-content/plugins/code-block-pro/build/style-index.css’, [], ‘1.0.0’, ‘all’ ); } add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_scripts’ ); add_filter(‘mpcs_classroom_style_handles’, function($allowed_handles){ $allowed_handles[] = ‘code-block’; $allowed_handles[] = ‘code-block-font’; $allowed_handles[] = ‘code-block-css’;…Continue reading
Pipeline API Auto Sync
add_action(‘init’, ‘pipeline_save_api_data_to_static_json’); function pipeline_save_api_data_to_static_json() { if (!is_main_query() || !is_admin()) return; if (isset($_GET[‘run_pipeline_sync’]) && current_user_can(‘manage_options’)) { pipeline_run_api_sync(); exit(‘Sync completed’); } } function pipeline_run_api_sync() { $auth_url = ‘https://pipeline-wp-api.locallabs.com/api/v2/authenticate’; $email = defined(‘PIPELINE_API_EMAIL’) ? PIPELINE_API_EMAIL : ”; $password = defined(‘PIPELINE_API_PASSWORD’) ? PIPELINE_API_PASSWORD : ”;…Continue reading
Breeze Auto Cache Clear > Wp All Import
add_action(‘pmxi_saved_post’, ‘trigger_breeze_secure_cache_purge’, 10, 1); function trigger_breeze_secure_cache_purge($post_id) { $url = home_url(‘/wp-json/breeze/v1/purge’); $response = wp_remote_post($url, [ ‘headers’ => [ ‘Content-Type’ => ‘application/json’, ‘Authorization’ => ‘Bearer NH1QZ2zi0aef’, // your Breeze API key ], ‘body’ => json_encode([ ‘urls’ => [get_permalink($post_id)], // optional: purge only…Continue reading