echo "Please Select Slider"; } } else { if (isset($header_banner_style) && $header_banner_style == 'custom_slider') { if (isset($custom_slider_id) && $custom_slider_id != '') { echo do_shortcode(htmlspecialchars_decode($custom_slider_id)); } else { echo "Please Enter Shortcode"; } } } } /* Header Slider and Map Code start */ if (is_page()) { $page_element_header = 0; $cs_meta_page = cs_meta_page('cs_page_builder'); if (!empty($cs_meta_page)) { echo '<div class="header_element">'; foreach ($cs_meta_page->children() as $cs_node) { if ($cs_node->getName() == "map" and $cs_node->map_view == "header") { $page_element_header++; echo cs_map_page(); } elseif ($cs_node->getName() == "slider" and $cs_node->slider_view == "header" and $cs_node->slider_type != "Custom Slider") { get_template_part('page_slider', 'page'); $page_element_header++; $cs_position = 'absolute'; } } echo '</div>'; if ($page_element_header >= 1) { echo '<div class="clear"></div>';
function get_subheader_title() { global $post, $wp_query, $cs_theme_option; $get_title = ''; $header_banner_style = ''; if (is_page() || is_single()) { if (is_page()) { $cs_xmlObject = cs_meta_page('cs_page_builder'); $header_banner_style = $cs_xmlObject->header_banner_style; if (isset($cs_xmlObject)) { $subtitle = $cs_xmlObject->page_sub_title; } $get_title = '<h1 class="cs-page-title">' . substr(get_the_title(), 0, 40) . '</h1>'; } elseif (is_single()) { $post_type = get_post_type($post->ID); if ($post_type == "events") { $post_type = "cs_event_meta"; } else { if ($post_type == "cs_cause") { $post_type = "cs_cause_meta"; } else { if ($post_type == "teams") { $post_type = "cs_team"; } else { $post_type = "post"; } } } $post_xml = get_post_meta($post->ID, $post_type, true); if ($post_xml != "") { $cs_xmlObject = new SimpleXMLElement($post_xml); } $header_banner_style = $cs_xmlObject->header_banner_style; if (isset($cs_xmlObject) && $cs_xmlObject->page_sub_title != "") { $subtitle = $cs_xmlObject->page_sub_title; } $get_title = '<h1 class="cs-page-title">' . get_the_title() . '</h1>'; } echo $get_title; if (isset($header_banner_style) && $header_banner_style == 'default_header') { if (isset($cs_theme_option['page_sub_title_default'])) { $subtitle = $cs_theme_option['page_sub_title_default']; } if (isset($subtitle) && $subtitle != '') { echo '<p>' . $subtitle . '</p>'; } } else { if (isset($subtitle) && $subtitle != '') { echo '<p>' . $subtitle . '</p>'; } } } else { if (isset($cs_theme_option['page_sub_title']) && $cs_theme_option['page_sub_title'] != '') { $page_sub_title = $cs_theme_option['page_sub_title']; } else { $page_sub_title = ''; } ?> <h1 class="cs-page-title"><?php cs_post_page_title(); ?> </h1> <?php if (isset($page_sub_title) && $page_sub_title != '') { echo '<p>' . $page_sub_title . '</p>'; } } }