This file contains hidden or 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
/* EXAMPLE CUSTOM LOOP (WPQUERY) WITH PAGINATION */ | |
function video_testimonial_loop() { | |
$per_page = 8; | |
$paged = get_query_var( 'page' ); | |
$args = array ( | |
'post_type' => 'defunktnutestimon', | |
'posts_per_page' => $per_page, | |
'paged' => $paged, | |
'meta_query' => array( |
This file contains hidden or 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
// Register horseraces | |
$args = array( | |
"labels" => array( | |
"name" => "Paardenrassen", | |
"singular_name" => "Paardenras", | |
"all_items" => "Alle paardenrassen", | |
"add_new" => "Voeg een paardenras toe", | |
"add_new_item" => "Voeg een paardenras toe", | |
"edit_item" => "Pas paardenras aan", | |
"new_item" => "Nieuw paardenras", |
This file contains hidden or 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
// Register training taxonomy | |
// Add new taxonomy, NOT hierarchical (like tags) | |
$labels = array( | |
'name' => __( 'Type training', 'taxonomy general name' ), | |
'singular_name' => __( 'Type training', 'taxonomy singular name' ), | |
'search_items' => __( 'Zoek in types training' ), | |
'popular_items' => __( 'Vaak gebruikte trainingtypes' ), | |
'all_items' => __( 'Alle trainingtypes' ), | |
'parent_item' => null, | |
'parent_item_colon' => null, |
This file contains hidden or 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
// add tag support to pages | |
function tags_support_all() { | |
register_taxonomy_for_object_type('post_tag', 'page'); | |
register_taxonomy_for_object_type('post_tag', 'defunktnuvideos'); | |
register_taxonomy_for_object_type('post_tag', 'defunktnuteam'); | |
register_taxonomy_for_object_type('post_tag', 'defunktnutestimon'); | |
register_taxonomy_for_object_type('post_tag', 'defunktnucourse'); | |
register_taxonomy_for_object_type('post_tag', 'defunktnuhorses'); | |
} |
This file contains hidden or 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
add_action('current_screen', "whats_my_hook" ); | |
function whats_my_hook() { | |
global $page_hook; | |
echo "My page hook:" . $page_hook; | |
} |
This file contains hidden or 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 test_field( $args, $field, $post ) { | |
// modify the order | |
$args['orderby'] = 'date'; | |
$args['order'] = 'DESC'; | |
$args['posts_per_page'] = 2; | |
return $args; | |
} | |
add_filter('acf/fields/post_object/query/key=field_5442b71190417', 'test_field', 10, 3); |
This file contains hidden or 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
class WC_Gateway_BACS_custom extends WC_Gateway_BACS { | |
function __construct() { | |
parent::__construct(); | |
} | |
/** | |
* Process the payment and return the result | |
* | |
* @access public |
This file contains hidden or 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
class WC_Gateway_BACS_custom extends WC_Gateway_BACS { | |
function __construct() { | |
parent::__construct(); | |
} | |
/** | |
* Process the payment and return the result | |
* | |
* @access public |
This file contains hidden or 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 | |
// Example of how to use a SilverStripe module: https://github.com/dendeffe/Def_MailTools | |
/**** | |
/ CONFIG | |
***/ | |
// You can do these config settings in mysite/_config.php |
NewerOlder