'', 'random-default' => false, 'width' => 1800, 'height' => 470, 'flex-height' => false, 'flex-width' => false, 'default-text-color' => '', 'header-text' => false, 'uploads' => true, 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => ''); add_theme_support( 'custom-header', $defaults ); } add_action('init', 'set_header_image'); /* LAAD JQUERY */ function laad_jquery() { wp_deregister_script( 'jquery' ); wp_register_script( 'jquery', "//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"); wp_enqueue_script( 'jquery' ); }; add_action('wp_enqueue_scripts', 'laad_jquery'); function ShortenText($text,$limit) { // Change to the number of characters you want to display $chars_limit = $limit; $chars_text = strlen($text); $text = $text." "; $text = substr($text,0,$chars_limit); $text = substr($text,0,strrpos($text,' ')); // If the text has more characters that your limit, //add ... so the user knows the text is actually longer if ($chars_text > $chars_limit) { $text = $text."..."; } return $text; } function new_excerpt(){ echo "

".substr(get_the_excerpt(),0,265)."

"; } add_filter('the_content', 'addlightboxrel_replace'); function addlightboxrel_replace ($content) { global $post; $pattern = "//i"; $replacement = ''; $content = preg_replace($pattern, $replacement, $content); $content = str_replace("%LIGHTID%", $post->ID, $content); return $content; } /* FIELDS */ if(function_exists("register_field_group")) { register_field_group(array ( 'id' => 'acf_afbeeldingen', 'title' => 'Afbeeldingen', 'fields' => array ( array ( 'key' => 'field_537dc187cb65a', 'label' => 'Afbeeldingen', 'name' => 'afbeeldingen', 'type' => 'gallery', 'preview_size' => 'thumbnail', 'library' => 'all', ), ), 'location' => array ( array ( array ( 'param' => 'post_type', 'operator' => '==', 'value' => 'page', 'order_no' => 0, 'group_no' => 0, ), ), ), 'options' => array ( 'position' => 'normal', 'layout' => 'default', 'hide_on_screen' => array ( ), ), 'menu_order' => 0, )); register_field_group(array ( 'id' => 'acf_front-topics', 'title' => 'Front topics', 'fields' => array ( array ( 'key' => 'field_537dcf66b9d72', 'label' => 'Button text', 'name' => 'knoptekst', 'type' => 'text', 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => '', ), array ( 'key' => 'field_537dcf80b9d73', 'label' => 'Direction url', 'name' => 'verwijs_url', 'type' => 'text', 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => '', ), ), 'location' => array ( array ( array ( 'param' => 'post_type', 'operator' => '==', 'value' => 'topics', 'order_no' => 0, 'group_no' => 0, ), ), ), 'options' => array ( 'position' => 'acf_after_title', 'layout' => 'default', 'hide_on_screen' => array ( ), ), 'menu_order' => 0, )); } ?>