post_parent) ? $post->post_parent : $postID; // redirect first child --> also possible: wp_redirect(get_permalink($parent->ID)); wp_redirect(get_permalink($firstchild->ID), 301); exit; } } } } // Wordpress Header ######################################################################################################### get_header(); // only if activated in the settings of the 'homepage' (CFT) if($show_edit_button == true) edit_post_link('','
','
'); ?>
No slideshow ID set.'; else : include 'wp-content/themes/love/extras/slideshow-snippet.php'; endif; endif; // image for the top of the page (based on CTF) if($content_image) : $postid = $sidebar_image; $attachment = get_post($postid); $url = wp_get_attachment_url($postid); $image_meta = wp_get_attachment_metadata($attachment->ID); $image_width = $image_meta['width']; $image_height = $image_meta['height']; echo '' . get_the_title() . ' - ' . get_bloginfo('; endif; ?>
' . $tab_page_headline . ''; include 'wp-content/themes/love/extras/tabs.php'; endif; // Accessible Accordion (position above content) ########################################################################## // works with the plugin ACF and in this case (the_repeater_field + the_sub_field) if($accordion && $accordion_created && $accordion_position == 'above content') : if($accordion_page_headline) echo '

' , $accordion_page_headline , '

'; include 'wp-content/themes/love/extras/accordion.php'; endif; // Get all custom fields attached to this post and store them in an array (see functions.php and custom_fields.php) /* $custom_field_array = base_get_all_custom_fields(); if( !empty($custom_field_array) ) { print_r($custom_field_array); } */ // output of custom code for content (based on an option in the page setting 'Advanced Options' if($show_extra_content == true && $extra_content_position == 'top') echo $extra_content_content; // this here is the normal option without content filter if($extra_content) echo $extra_content; // special container - only on the homepage if($postID == $check_home) echo '
'; // START main content ###################################################################################################### if (have_posts()) : while (have_posts()) : the_post(); if(!$hide_content) : // if not deactivated by custom field the_content(); endif; wp_reset_query(); // reset loop endwhile; endif; // Overview page for showing excerpts of pages / sub pages if ($overview_page) include 'wp-content/themes/love/extras/sub_pages_overview.php'; // Output for Overview Page - Subpages // checks the current page (ID case by case) and displays whatever is needed switch ($postID) { case $check_home : // homepage stuff break; // 'News' page case $news_page : include 'wp-content/themes/love/extras/latest-news.php'; break; // 'Blog' case $blog_page : include 'wp-content/themes/love/extras/blog.php'; break; // 'Links' page --> Category 'Social Media Links' [10] excluded! case $links_page : wp_list_bookmarks('title_before=

&title_after=

&exclude_category=10&category_before=
&category_after=&before=

&between=
&after=

&orderby=rating&order=DESC&category_orderby=name&show_description=1&show_images=0&class=verlinkungen'); // alternative = plugin: link-library break; // 'Contact' page case $contact_page : // page with contact form and iphorm call if(function_exists('iphorm')) : if(!$form_id) echo iphorm(1); else echo iphorm($form_id); endif; if(function_exists('insert_cform')) : if(!$form_id) insert_cform('1'); else insert_cform($form_id); endif; break; // 'Quotes' page case $quotes_page : // page with quotes from the 'Quotes/Reviews' section of the website $quotes_include = 'content'; // for later use in the quotes snippet include 'wp-content/themes/love/extras/quotes-snippet.php'; // include the file to handle latest quotes break; // Registration page case $reg_page : // event registration form and functions include 'wp-content/themes/love/extras/event-registration.php'; break; // Newsletter handling case $newsletter_page : // here the form will be placed in the page (we use this variable to set a class for the form container) $location = "form-in-page"; include 'wp-content/themes/love/extras/newsletter_handling.php'; break; } // cforms forms (optional ID or default ID = 1) if($form == true && $postID != $contact_page && $postID != $reg_page) : if(function_exists('insert_cform')) : if(!$form_id) insert_cform('1'); else insert_cform($form_id); endif; if(function_exists('iphorm')) : if(!$form_id) echo iphorm(1); else echo iphorm($form_id); endif; endif; // Special Admin Include - include document based on file name in cft if($admin_code_include) get_template_part('extras/' . $admin_code_include); // output of custom code for content (based on an option in the page setting 'Advanced Options' # if($show_extra_content == true && $extra_content_position == 'bottom') echo $extra_content_content; if($show_extra_content == true) echo $extra_content_content; // Tag Cloud ############################################################################################################## // currently inactive: tag cloud (animated flash or static html) if($show_tag_cloud && $tag_cloud_position == 'content') get_template_part('extras/tagcloud.php'); // currently inactive: Tag Cloud for NextGen Gallery ########################################################################################### if($gallery_tags) : // shortcode output (is neccessary otherwise no picture is shown) $gallery = '[tagcloud]'; $gallery = apply_filters('the_content', $gallery ); echo ''; endif; // NextGen Gallery ID ########################################################################################### if($page_type == 'gallery' && $gallery_manually == false) : // shortcode output $gallery_sc = '[nggallery id=' . $gallery_id . ']'; $gallery_sc = apply_filters('the_content', $gallery_sc ); echo $gallery_sc; endif; // Page with Events ########################################################################################### if($page_type == 'events') : include 'wp-content/themes/love/events.php'; endif; // Accessible Accordion (position below content) ########################################################################## // works with the plugin ACF and in this case (the_repeater_field + the_sub_field) if($accordion && $accordion_created && $accordion_position == 'below content') include 'wp-content/themes/love/extras/accordion.php'; // Accessible Tabs (position below content) ############################################################################### // works with the plugin ACF and in this case (the_repeater_field + the_sub_field) if($tabs && $tabs_created && $tabs_position == 'below content') include 'wp-content/themes/love/extras/tabs.php'; // Slideshow - position below the content ############################################################################## // works with the plugin ACF and in this case (the_repeater_field + the_sub_field) if($slideshow && $slideshow_type != 'big') : if($slideshow_ID == NULL) : echo 'No slideshow ID set.'; else : include 'wp-content/themes/love/extras/slideshow-snippet.php'; endif; endif; // Content boxes - position below the content ######################################################################### // works with the plugin ACF and in this case (the_repeater_field + the_sub_field) if($content_box_1 || $content_box_2) : include 'wp-content/themes/love/extras/boxes-snippet.php'; endif; // embedding of youtube playlists (js/jquery.youtubeplaylist.js) // based on http://geckohub.com/jquery/youtubeplaylist/gallery.html if($youtube_playlist) : while( has_sub_field('yt_playlist') ) { $position = get_sub_field('yt_list_position'); }; if($position == 'bottom') echo do_shortcode('[sc-youtube-playlist]'); endif; // if position of subpages is 'content bottom' if($subpages == true && $subpages_position == 'content bottom') : include 'wp-content/themes/love/extras/sub_pages_navigation.php'; // include the file to handle latest quotes endif; // comments in a page if($comments == true) comments_template( '', true ); // close special container on homepage if($postID == $check_home) : // include 'wp-content/themes/love/extras/extra-box-snippet.php'; // local time and weather echo '
'; endif; // facebook like, google+, twitter + share / bookmark // position is defined in the home page settings // position options: sidebar, content, footer, content-sidebar, content-footer, footer-sidebar if($deactivate_social_local == false): // show the items only if not deactivated for local dvelopment if($social_sharing_position == 'content' || $social_sharing_position == 'content-sidebar') : if(($social_sharing == 'yes') || ($social_features == 'yes')) include 'extras/social-features.php'; endif; endif; ?>
No slideshow ID set.'; else : include 'wp-content/themes/love/extras/slideshow-snippet.php'; endif; endif; // image for the sidebar (based on CTF) if($sidebar_image) : $postid = $sidebar_image; $attachment = get_post($postid); $url = wp_get_attachment_url($postid); $image_meta = wp_get_attachment_metadata($attachment->ID); $image_width = $image_meta['width']; $image_height = $image_meta['height']; echo '' . get_the_title() . ' - ' . get_bloginfo('; endif; ?>
'; $sidebar_array[$count].= $events_header_sidebar; $sidebar_array[$count].= ''; ob_start(); include 'wp-content/themes/love/extras/events-snippet.php'; $sidebar_array[$count].= ob_get_clean(); $identifier[$position] = "events"; // for separator css $count++; $position++; endif; // display contact information from a certain page (defined in the setting of the homepage and displayed from a page ID that is defined in that settings) if($display_contact == true) : $sidebar_array[$count] = $contact_info; if($contact_additional) $sidebar_array[$count].= $contact_additional; $identifier[$position] = "contact"; // for separator css $count++; $position++; endif; // include of latest-news-sidebar.php --> display news from cat if($news_in_sidebar == true) : ob_start(); include 'wp-content/themes/love/extras/latest-news-sidebar.php'; // include the file to handle latest news $sidebar_array[$count] = ob_get_clean(); $identifier[$position] = "news"; // for separator css $count++; $position++; endif; // if position of subpages is 'right bottom' if($subpages == true && $subpages_position == 'right bottom') : ob_start(); include 'wp-content/themes/love/extras/sub_pages_navigation.php'; // include the file to handle latest quotes $sidebar_array[$count] = ob_get_clean(); $identifier[$position] = "subpages-bottom"; // for separator css $count++; $position++; endif; // currently inactive // tag cloud (animated flash or static html) if($show_tag_cloud && $tag_cloud_position == 'right') : ob_start(); include 'wp-content/themes/love/extras/tagcloud.php'; // include the file to handle latest quotes $sidebar_array[$count] = ob_get_clean(); $identifier[$position] = "tagcloud"; // for separator css $count++; $position++; endif; // include of latest-quotes-sidebar.php --> display quotes/reviews/comments from cat if($quotes_in_sidebar == true) : // variable which helps to change output according to the include in the sidebar $quotes_include = 'sidebar'; // for later use in the quotes snippet ob_start(); include 'wp-content/themes/love/extras/quotes-snippet.php'; // include the file to handle latest quotes $sidebar_array[$count] = ob_get_clean(); $identifier[$position] = "quotes"; // for separator css $count++; $position++; endif; // display the newsletter sign-up form if($newsletterform_in_sidebar == 'yes') : ob_start(); include 'wp-content/themes/love/extras/newsletter.php'; $sidebar_array[$count] = ob_get_clean(); $identifier[$position] = "newsletter"; // for separator css $count++; $position++; endif; #################################### ################################## #################################### ################################## # change conditions // social media - position right if($social_media_links && $social_media_link_page_pos == 'right' || $social_media_link_page_pos == 'both' && $deactivate_social_local == false) : $sidebar_array[$count] = '

Social Media

'; $count++; endif; // if content set to display if($content_in_sidebar == 'yes' || $content_of_id) : // get content if id is set for displaying content of a particular page in the sidebar if($content_of_id) : $thepost = get_post( $content_of_id ); $content = $thepost->post_content; $content = apply_filters('the_content', $content); $sidebar_array[$count] = $content; $identifier[$position] = "content-of-id"; // for separator css $count++; $position++; endif; // right column content output if($content_of_sidebar) : $sidebar_array[$count] = $content_of_sidebar; $identifier[$position] = "content-of-sidebar"; // for separator css $count++; $position++; endif; endif; // end if($content_in_sidebar) // current order of elements /* Tabs (wenn Einstellung 'über dem Text') Liste der Unterseiten (wenn Einstellung 'rechte Spalte oben') Inhalt einer anderen Seite Inhalt (normal) Kontakt News Liste der Unterseiten (wenn Einstellung 'rechte Spalte unten') Termine Zitate Newsletter Social Media Links Tabs (wenn Einstellung 'unter dem Inhalt') */ // START sidebar output / right column ############################################################################################# // check if sidebar respectively 'right column' is active if(is_array($sidebar_array) && count($sidebar_array) > 0) : // count elements in $sidebar_array $elements = count($sidebar_array); // manipulate the order if necessary $counter = 0; while (list(, $value) = each($sidebar_array)) { echo $value; if($counter < $elements - 1) : echo '
'; $counter++; endif; } endif; // Accessible Tabs (position below content) ############################################################################### // works with the plugin ACF and in this case (the_repeater_field + the_sub_field) if($tabs_sidebar && $tabs_created_sidebar && $tabs_position_sidebar == 'below content') : include 'wp-content/themes/love/extras/tabs.php'; endif; // include of the sidebar for the blog if($postID == $blog_page) include 'wp-content/themes/love/extras/sidebar.php'; ?>