This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Assortiment Custom Post Type*/ | |
function madiba_custom_post_assortiment() { | |
$labels = array( | |
'name' => _x( 'Assortiment', 'post type general name' ), | |
'singular_name' => _x( 'Assortiment', 'post type singular name' ), | |
'add_new' => _x( 'Nieuwe bloem', 'crop' ), | |
'add_new_item' => __( 'Nieuwe bloem toevoegen' ), | |
'edit_item' => __( 'Wijzig bloem' ), | |
'new_item' => __( 'Nieuw item' ), | |
'all_items' => __( 'Alle bloemen' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function frisonline_remove_wp_version_strings( $src ) { | |
global $wp_version; | |
parse_str(parse_url($src, PHP_URL_QUERY), $query); | |
if ( !empty($query['ver']) && $query['ver'] === $wp_version ) { | |
$src = remove_query_arg('ver', $src); | |
} | |
return $src; | |
} | |
add_filter( 'script_loader_src', 'frisonline_remove_wp_version_strings' ); | |
add_filter( 'style_loader_src', 'frisonline_remove_wp_version_strings' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteRule ^author/username/ https://jouwwebsite.com/ [R=301,L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Block Name: Testimonial | |
* | |
* Het template bestand wat we gebruiken voor ons Testimonial block | |
*/ | |
// afbeelding veld ophalen (array) | |
$avatar = get_field('afbeelding'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_acf_block_render_callback( $block ) { | |
// convert name ("acf/testimonial") into path friendly slug ("testimonial") | |
$slug = str_replace('acf/', '', $block['name']); | |
// template bestand vanuit de "template-parts/block" map includen | |
if( file_exists(STYLESHEETPATH . "/blocks/content-{$slug}.php") ) { | |
include( STYLESHEETPATH . "/blocks/content-{$slug}.php" ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('acf/init', 'my_acf_init'); | |
function my_acf_init() { | |
// check of de functie bestaat | |
if( function_exists('acf_register_block') ) { | |
// Custom Testimonail block registrerend | |
acf_register_block(array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |