function rosa_post_classes($classes) { //only add this class for regular pages if (get_page_template_slug(get_the_ID()) == '') { $subtitle = trim(get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'page_cover_subtitle', true)); $title = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'page_cover_title', true); $description = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'page_cover_description', true); if (!(has_post_thumbnail() || !empty($subtitle) || $title !== ' ' || !empty($description))) { $classes[] = 'no-page-header'; } } return $classes; }
$post = get_post($shop_page_id); setup_postdata($post); $make_transparent_menu_bar = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'header_transparent_menu_bar', true); if ($make_transparent_menu_bar == 'on') { $class_name .= ' header--transparent'; } } } } //make the header menu bar transparent //only for static pages if (is_page()) { if (get_page_template_slug(get_the_ID()) == 'page-templates/contact.php') { $make_transparent_menu_bar = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'header_transparent_menu_bar_contact', true); } else { $make_transparent_menu_bar = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'header_transparent_menu_bar', true); } if ($make_transparent_menu_bar == 'on') { $class_name .= ' header--transparent'; } } $schema_org = ''; if (is_single()) { $schema_org .= 'itemscope itemtype="http://schema.org/Article"'; } else { $schema_org .= 'itemscope itemtype="http://schema.org/WebPage"'; } ?> <body <?php body_class($class_name);
if (empty($pin_type)) { $pin_type = 'single'; } } else { $pin_type = ''; } /* for PRO users! - FIRST TEST FOR CONTACT PAGE TEMPLATE */ if ($pin_type == 'single') { //get the Google Maps URL to test if empty $gmap_url = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'gmap_url', true); if (!empty($gmap_url)) { //set the global so everybody knows that we are in dire need of the Google Maps API $is_gmap = true; $gmap_custom_style = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'gmap_custom_style', true); $gmap_marker_content = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'gmap_marker_content', true); $gmap_height = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'page_gmap_height', true); if (empty($gmap_height)) { $gmap_height = 'half-height'; //the default } // remove classes coming from default template's header height option $classes = str_replace(array('half-height', 'two-thirds-height', 'full-height'), '', $classes); $classes .= ' ' . $gmap_height; ?> <header id="post-<?php the_ID(); ?> -title" class="<?php echo esc_attr($classes); ?> ">
if (get_page_template_slug(get_the_ID()) == 'page-templates/contact.php') { if (empty($pin_type)) { $pin_type = 'single'; } } else { $pin_type = ''; } /* FIRST TEST FOR CONTACT PAGE TEMPLATE */ if ($pin_type == 'single') { //get the Google Maps URL to test if empty $gmap_url = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'gmap_url', true); if (!empty($gmap_url)) { //set the global so everybody knows that we are in dire need of the Google Maps API $is_gmap = true; $gmap_custom_style = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'gmap_custom_style', true); $gmap_marker_content = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'gmap_marker_content', true); $classes .= ' ' . $gmap_height; ?> <header id="post-<?php the_ID(); ?> -title" class="article__header article__header--page two-thirds-height"> <div id="gmap-<?php the_ID(); ?> " class="gmap" data-url="<?php esc_attr_e($gmap_url); ?> " <?php echo $gmap_custom_style == 'on' ? 'data-customstyle' : '';
* Description: This is the template that is used for pages that have a header section with a slideshow instead of a featured image * It is a page with additional controls for the slideshow */ global $post; //some global variables that we use in our page sections $is_gmap = false; $footer_needs_big_waves = false; $page_section_idx = 0; get_header(); while (have_posts()) { the_post(); ?> <?php get_template_part('templates/page/header'); $classes = "article--page article--main"; $border_style = get_post_meta(wpgrade::lang_page_id(get_the_ID()), wpgrade::prefix() . 'page_border_style', true); if (!empty($border_style)) { $classes .= ' border-' . $border_style; } if (!empty($post->post_content)) { ?> <article id="post-<?php the_ID(); ?> " <?php post_class($classes); ?> > <section class="article__content"> <div class="container">