'post_name', 'aussehen' => '', 'parent' => '', 'ids' => '', ), $atts)); if(!empty($parent)){ $smargs = array( 'exclude' => implode(',', get_option('sep_exclude', array())), 'child_of' => $parent, 'title_li' => '', 'parent' => $parent, 'sort_order' => 'ASC', 'sort_column' => $sort ); $smitem = get_pages( $smargs ); } else { //get current page ID $the_id = get_the_ID(); $smargs = array( 'exclude' => implode(',', get_option('sep_exclude', array())), 'child_of' => $the_id, 'title_li' => '', 'parent' => $the_id, 'sort_order' => 'ASC', 'sort_column' => $sort ); $smitem = get_pages( $smargs ); } if(!empty($ids)) { $smitem = get_pages( array('include' => $ids) ); } foreach($smitem as $value){ $thumb = get_the_post_thumbnail( $value->ID, 'thumbnail', $attr = '' ); $children .= "
  • "; $children .= "" . $thumb . ""; $children .= "

    " . $value->post_title . ""; $children .= "" . $value->post_excerpt . "

    "; $children .= "
  • "; } return ''; } add_shortcode('unterseiten', 'kr8_sitemap'); //Excerpt for Pages add_post_type_support( 'page', 'excerpt' ); //Tabs for Editor *************** function tabs_shortcode( $atts, $content = null ) { if ( comments_open() || have_comments() ) { return '
    ' . do_shortcode($content) . '
    '; } else { return '
    ' . do_shortcode($content) . '
    '; } } add_shortcode( 'tabs', 'tabs_shortcode' ); function tab_shortcode( $atts, $content = null ) { extract(shortcode_atts(array( 'title' => 'Titel anpassen', ), $atts)); return '

    ' .$title .'

    ' . do_shortcode($content) . '
    '; } add_shortcode( 'tab', 'tab_shortcode' ); add_filter("the_content", "the_content_filter"); function the_content_filter($content) { // array of custom shortcodes requiring the fix $block = join("|",array("col","tabs","tab")); // opening tag $rep = preg_replace("/(

    )?\[($block)(\s[^\]]+)?\](<\/p>|
    )?/","[$2$3]",$content); // closing tag $rep = preg_replace("/(

    )?\[\/($block)](<\/p>|
    )?/","[/$2]",$rep); return $rep; } //Query Posts *************** function beitraege_lists($atts, $content = null) { extract(shortcode_atts(array( "ids" => '', 'aussehen' => '', 'kategorien' => '', 'anzahl' => '-1', 'suchfeld' => 'term_id', ), $atts)); global $wp_query,$paged,$post; $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); if(!empty($ids)){ // Einzelne Beiträge $ids = explode(',', $ids); $args = array( 'post_type' => 'any', //'post__in' => array( $ids ), 'post__in' => $ids , 'orderby' => 'post__in', 'posts_per_page' => -1, 'ignore_sticky_posts' => 1 ); } else { if(!empty($kategorien)){ // Beiträge einer Kategorie // $kategorien = explode(',', $kategorien); $args = array( 'post_type' => 'any', 'tax_query' => array( array( 'taxonomy' => 'category', 'field' => $suchfeld, 'terms' => $kategorien, ) ), 'posts_per_page' => $anzahl, 'ignore_sticky_posts' => 1 ); } else { // Fallback $args = array( 'post_type' => 'any', 'page_id' => 20, 'posts_per_page' => 1, 'ignore_sticky_posts' => 1 ); } } $wp_query->query($args); ob_start(); ?>

    have_posts()) : $wp_query->the_post(); ?>
    'true', "person" => '', "abteilung" => '', ), $atts)); global $wp_query,$paged,$post; $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); if(!empty($person)){ $person = explode(',', $person); $args = array( 'post_type' => 'person', 'post__in' => $person, 'order' => 'ASC', 'orderby' => 'meta_value', 'meta_key' => 'kr8mb_pers_pos_listenplatz', 'abteilung' => $abteilung, ); } else { $args = array( 'post_type' => 'person', 'order' => 'ASC', 'orderby' => 'meta_value', 'meta_key' => 'kr8mb_pers_pos_listenplatz', 'abteilung' => $abteilung, 'posts_per_page' => -1, ); } $wp_query->query($args); ob_start(); ?>
    have_posts()) : $wp_query->the_post(); ?>
    'true', "person" => '', "abteilung" => '', ), $atts)); global $wp_query,$paged,$post; $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); if(!empty($person)){ $person = explode(',', $person); $args = array( 'post_type' => 'person', 'post__in' => $person, 'order' => 'ASC', 'orderby' => 'meta_value', 'meta_key' => 'kr8mb_pers_pos_listenplatz', 'abteilung' => $abteilung, ); } else { $args = array( 'post_type' => 'person', 'order' => 'ASC', 'orderby' => 'meta_value', 'meta_key' => 'kr8mb_pers_pos_listenplatz', 'abteilung' => $abteilung, 'posts_per_page' => -1, ); } $wp_query->query($args); ob_start(); ?>
    have_posts()) : $wp_query->the_post(); ?>
    'true', "person" => '', "abteilung" => '', ), $atts)); global $wp_query,$paged,$post; $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); if(!empty($person)){ $person = explode(',', $person); $args = array( 'post_type' => 'person', 'post__in' => $person, 'order' => 'ASC', 'orderby' => 'meta_value', 'meta_key' => 'kr8mb_pers_pos_sortierung', 'abteilung' => $abteilung, ); } else { $args = array( 'post_type' => 'person', 'order' => 'ASC', 'orderby' => 'meta_value', 'meta_key' => 'kr8mb_pers_pos_sortierung', 'abteilung' => $abteilung, 'posts_per_page' => -1, ); } $wp_query->query($args); ob_start(); ?>
    have_posts()) : $wp_query->the_post(); ?>
    'true', "person" => '', "abteilung" => '', ), $atts)); global $wp_query,$paged,$post; $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); if(!empty($person)){ $person = explode(',', $person); $args = array( 'post_type' => 'person', 'post__in' => $person, 'order' => 'ASC', 'orderby' => 'meta_value', 'meta_key' => 'kr8mb_pers_pos_sortierung', 'abteilung' => $abteilung, ); } else { $args = array( 'post_type' => 'person', 'order' => 'ASC', 'orderby' => 'meta_value', 'meta_key' => 'kr8mb_pers_pos_sortierung', 'abteilung' => $abteilung, 'posts_per_page' => -1, ); } $wp_query->query($args); ob_start(); ?>
    have_posts()) : $wp_query->the_post(); ?>
    'true', "person" => '', "abteilung" => '', ), $atts)); global $wp_query,$paged,$post; $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); if(!empty($person)){ $person = explode(',', $person); $args = array( 'post_type' => 'person', 'post__in' => $person, 'order' => 'ASC', 'orderby' => 'meta_value', 'meta_key' => 'kr8mb_pers_pos_sortierung', 'abteilung' => $abteilung, ); } else { $args = array( 'post_type' => 'person', 'order' => 'ASC', 'orderby' => 'meta_value', 'meta_key' => 'kr8mb_pers_pos_sortierung', 'abteilung' => $abteilung, 'posts_per_page' => -1, ); } $wp_query->query($args); ob_start(); ?>
    have_posts()) : $wp_query->the_post(); ?>
    'true', "person" => '', "abteilung" => '', ), $atts)); global $wp_query,$paged,$post; $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); if(!empty($person)){ $person = explode(',', $person); $args = array( 'post_type' => 'person', 'post__in' => $person, 'order' => 'ASC', 'orderby' => 'meta_value', 'meta_key' => 'kr8mb_pers_pos_listenplatz', 'abteilung' => $abteilung, ); } else { $args = array( 'post_type' => 'person', 'order' => 'ASC', 'orderby' => 'meta_value', 'meta_key' => 'kr8mb_pers_pos_listenplatz', 'abteilung' => $abteilung, 'posts_per_page' => -1, ); } $wp_query->query($args); ob_start(); ?>
    have_posts()) : $wp_query->the_post(); ?>
    'true', "gliederung" => '', "struktur" => '', ), $atts)); global $wp_query,$paged,$post; $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); if(!empty($gliederung)){ $gliederung = explode(',', $gliederung); $args = array( 'post_type' => 'gliederung', 'post__in' => $gliederung, 'order' => 'ASC', 'orderby' => 'title', 'struktur' => $struktur, 'posts_per_page' => -1, ); } else { $args = array( 'post_type' => 'gliederung', 'order' => 'ASC', 'orderby' => 'title', 'struktur' => $struktur, 'posts_per_page' => -1, ); } $wp_query->query($args); ob_start(); ?>
    have_posts()) : $wp_query->the_post(); ?>
    'true', "gliederung" => '', "struktur" => '', ), $atts)); global $wp_query,$paged,$post; $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); if(!empty($gliederung)){ $gliederung = explode(',', $gliederung); $args = array( 'post_type' => 'gliederung', 'post__in' => $gliederung, 'order' => 'ASC', 'orderby' => 'title', 'struktur' => $struktur, 'posts_per_page' => -1, ); } else { $args = array( 'post_type' => 'gliederung', 'order' => 'ASC', 'orderby' => 'title', 'struktur' => $struktur, 'posts_per_page' => -1, ); } $wp_query->query($args); ob_start(); ?>
    have_posts()) : $wp_query->the_post(); ?>
    '', "hintergrundfarbe" => '', "schriftfarbe" => '', "id" => '', "bgscroll" => '', "hintergrundbild" => '' ), $atts)); if ($vollbild !== '') { $class1 .= 'fullpage'; } else { $class1 .= 'textblock '; } if ($bgscroll !== '') { $class3 .= 'bgscroll'; } if ($hintergrundbild !== '') { $class2 .= 'parallax'; } return '
    '; } add_shortcode( 'parallax', 'section_shortcode' ); //ICON *************** function icon_shortcode( $atts ) { extract(shortcode_atts(array( "symbol" => 'fa-rocket', "groesse" => 'fa-4x', ), $atts)); return ''; } add_shortcode( 'icon', 'icon_shortcode' ); function section_abstand( $atts ) { return '
    '; } add_shortcode( 'abstand', 'section_abstand' ); //INFOBOX *************** function infobox_shortcode( $atts, $content = null ) { extract(shortcode_atts(array( "title" => 'Infobox', ), $atts)); return '

    '.$title.'

    '.$content.'
    '; } add_shortcode( 'infobox', 'infobox_shortcode' ); //BOXEN *************** function colorbox_shortcode( $atts, $content = null ) { return '
    '.$content.'
    '; } add_shortcode( 'box', 'colorbox_shortcode' ); //E-MAIL-ADRESSEN *************** function hide_email_shortcode( $atts , $content = null ) { if ( ! is_email( $content ) ) { return; } $content = antispambot( $content ); $email_link = sprintf( 'mailto:%s', $content ); return sprintf( '%s', esc_url( $email_link, array( 'mailto' ) ), esc_html( $content ) ); } add_shortcode( 'email', 'hide_email_shortcode' ); ?>