qa
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
1 changed file
with
38 additions
and
12 deletions
| 1 | <?php | 1 | <?php |
| 2 | /** | 2 | /** |
| 3 | * Template Name: Full Width | 3 | * Template Name: Page with no Prefooter |
| 4 | * | 4 | * |
| 5 | * Template for displaying a page without sidebar even if a sidebar widget is published. | 5 | * Template for displaying a page without Prefooter. |
| 6 | * | 6 | * @package Understrap |
| 7 | * @package understrap | ||
| 8 | */ | 7 | */ |
| 8 | |||
| 9 | // Exit if accessed directly. | 9 | // Exit if accessed directly. |
| 10 | defined( 'ABSPATH' ) || exit; | 10 | defined( 'ABSPATH' ) || exit; |
| 11 | 11 | ||
| ... | @@ -17,6 +17,7 @@ $post_thumbnail_id = get_post_thumbnail_id($post->ID); | ... | @@ -17,6 +17,7 @@ $post_thumbnail_id = get_post_thumbnail_id($post->ID); |
| 17 | $thumbnail_image = get_posts(array('p' => $post_thumbnail_id, 'post_type' => 'attachment')); | 17 | $thumbnail_image = get_posts(array('p' => $post_thumbnail_id, 'post_type' => 'attachment')); |
| 18 | $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID), 'full' ); | 18 | $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID), 'full' ); |
| 19 | $subhead = get_field('subhead'); | 19 | $subhead = get_field('subhead'); |
| 20 | //$badge = get_field('badge'); | ||
| 20 | 21 | ||
| 21 | if ($thumbnail_image && isset($thumbnail_image[0])) { | 22 | if ($thumbnail_image && isset($thumbnail_image[0])) { |
| 22 | $img_description = $thumbnail_image[0]->post_content; | 23 | $img_description = $thumbnail_image[0]->post_content; |
| ... | @@ -24,17 +25,37 @@ if ($thumbnail_image && isset($thumbnail_image[0])) { | ... | @@ -24,17 +25,37 @@ if ($thumbnail_image && isset($thumbnail_image[0])) { |
| 24 | $img_alt = get_post_meta($post_thumbnail_id , '_wp_attachment_image_alt', true); | 25 | $img_alt = get_post_meta($post_thumbnail_id , '_wp_attachment_image_alt', true); |
| 25 | $img_title = $thumbnail_image[0]->post_title; | 26 | $img_title = $thumbnail_image[0]->post_title; |
| 26 | $copy = get_field('copy', $post_thumbnail_id ); | 27 | $copy = get_field('copy', $post_thumbnail_id ); |
| 28 | if(!$copy){ | ||
| 29 | $en_post_thumbnail_id = apply_filters( 'wpml_object_id', $post_thumbnail_id , 'attachment', FALSE, 'en' ); | ||
| 30 | $copy = get_field('copy', $en_post_thumbnail_id ); | ||
| 31 | } | ||
| 27 | } | 32 | } |
| 28 | 33 | ||
| 29 | 34 | ||
| 30 | 35 | ||
| 31 | 36 | ||
| 37 | |||
| 32 | ?> | 38 | ?> |
| 33 | <?php if ( has_post_thumbnail() ) { ?> | 39 | <?php if ( has_post_thumbnail() ) { ?> |
| 34 | <header class="entry-header page" style=" background-image: url('<?php echo $url;?> ')"> | 40 | <header class="entry-header header page" style=" background-image: url('<?php echo $url;?> ')"> |
| 35 | 41 | <div class="content-container"> | |
| 42 | <div class="container" style="height: 100%;"> | ||
| 43 | <div class="col-md-12 fx-style"> | ||
| 36 | <div class="search-box"><div id="search-box-content"><?php the_field('page_search_block', 'option'); ?></div> <div class="search-button">Search</div></div> | 44 | <div class="search-box"><div id="search-box-content"><?php the_field('page_search_block', 'option'); ?></div> <div class="search-button">Search</div></div> |
| 45 | <div class="header_text"> | ||
| 46 | <div class="breadcrumb"><?php get_breadcrumb(); ?></div> | ||
| 47 | <?php the_field('header_text'); ?> | ||
| 48 | </div> | ||
| 49 | <?php if($badge){ | ||
| 50 | $badge_content = get_field('badge_content'); | ||
| 51 | echo "<div class='badge'><span>".$badge_content['badge_label']."</span><div class='badge_content'><p>".$badge_content['badge_text']."</p></div></div>"; | ||
| 52 | }?> | ||
| 53 | </div> | ||
| 54 | |||
| 55 | </div> | ||
| 56 | </div> | ||
| 37 | <div class='side-caption header-caption <?= (empty($copy) && empty($cap)) ? "hide" : "" ?>'> | 57 | <div class='side-caption header-caption <?= (empty($copy) && empty($cap)) ? "hide" : "" ?>'> |
| 58 | |||
| 38 | <a class='copy-link' aria-label="Header Slide Caption" href='#' ></a> | 59 | <a class='copy-link' aria-label="Header Slide Caption" href='#' ></a> |
| 39 | <span class='image-side-caption'> | 60 | <span class='image-side-caption'> |
| 40 | <span class='cap'><?= $photo_caption ?></span> | 61 | <span class='cap'><?= $photo_caption ?></span> |
| ... | @@ -43,13 +64,16 @@ if ($thumbnail_image && isset($thumbnail_image[0])) { | ... | @@ -43,13 +64,16 @@ if ($thumbnail_image && isset($thumbnail_image[0])) { |
| 43 | </div> | 64 | </div> |
| 44 | </header><!-- .entry-header --> | 65 | </header><!-- .entry-header --> |
| 45 | <?php } ?> | 66 | <?php } ?> |
| 46 | <div class="wrapper full-width" id="page-wrapper"> | 67 | <div class="wrapper" id="full-width-page-wrapper"> |
| 47 | 68 | ||
| 48 | <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1"> | 69 | <div class="<?php echo esc_attr( $container ); ?>" id="content"> |
| 49 | 70 | ||
| 50 | <main class="col-sm-12 col-md-12 content-area site-main" id="main"> | 71 | <div class="col-md-12 content-area" id="primary"> |
| 72 | |||
| 73 | <main class="site-main" id="main" role="main"> | ||
| 74 | |||
| 75 | <div class="header_text mobile"><div class="breadcrumb"><?php get_breadcrumb(); ?></div> <?php the_field('header_text'); ?> </div> | ||
| 51 | 76 | ||
| 52 | <div class="breadcrumb"><?php get_breadcrumb(); ?></div> | ||
| 53 | <?php | 77 | <?php |
| 54 | while ( have_posts() ) { | 78 | while ( have_posts() ) { |
| 55 | the_post(); | 79 | the_post(); |
| ... | @@ -60,9 +84,11 @@ if ($thumbnail_image && isset($thumbnail_image[0])) { | ... | @@ -60,9 +84,11 @@ if ($thumbnail_image && isset($thumbnail_image[0])) { |
| 60 | 84 | ||
| 61 | </main><!-- #main --> | 85 | </main><!-- #main --> |
| 62 | 86 | ||
| 63 | </div><!-- #content --> | 87 | </div><!-- #primary --> |
| 64 | 88 | ||
| 65 | </div><!-- #page-wrapper --> | 89 | </div><!-- #content --> |
| 66 | 90 | ||
| 91 | </div><!-- #full-width-page-wrapper --> | ||
| 92 | <?php //the_field('pre_footer', 'option'); ?> | ||
| 67 | <?php | 93 | <?php |
| 68 | get_footer(); | 94 | get_footer(); | ... | ... |
-
Please register or sign in to post a comment