Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $today = date("F");
- $supplier = get_the_title();
- $sani_supplier = sanitize_title($supplier);
- // *** echoes sanitized title
- echo "1".$sani_supplier;
- // *** echoes title
- echo " 2".$supplier;
- ?>
- <!-- Left Nav-->
- <!-- Content-->
- <?php
- global $post;
- $args = array(
- 'numberposts' => 1,
- 'post_type' => 'suppliers',
- 'taxonomy' => 'suppliersTax',
- 'term' => $sani_supplier,
- // *** 'suppliersTax' => $sani_supplier, <--went back to way I was doing before, was ignoring the arg
- 'post_status' => 'publish'
- );
- // *** echoes sanitized title
- echo "3".$sani_supplier;
- $homeSOTMHeader = get_posts( $args );
- foreach( $homeSOTMHeader as $post ) : setup_postdata($post);
- // *** only echoes sanitized title when title is a single word, otherwise nothing
- echo " inside foreach".$sani_supplier;
- ?>
- <div id="supplierHeader">
- <div id="supplierLogo" class="alignLeft">
- <?php if ( has_post_thumbnail() ) {the_post_thumbnail();} ?>
- </div>
- <ul id="companyHeaderInfoHorizontal">
- <?php
- $meta = get_post_meta(get_the_ID(), 'sp_homeHeaderCompanyLink', true);
- '' != $meta and print "<li><a href='$meta' target='_blank'>Company Site</a></li>";
- $meta = get_post_meta(get_the_ID(), 'sp_homeHeaderProductsLink', true);
- '' != $meta and print "<li><a href='$meta' target='_blank'>Browse Products</a></li>";
- $meta = get_post_meta(get_the_ID(), 'sp_homeHeaderContactsBox', true);
- '0' != $meta and print "<li><a class='inline' href='#contactsModal'>Contacts</a></li>";
- ?>
- </ul>
- <div id="sotmSeal" class="alignRight">
- <?php $meta = get_post_meta(get_the_ID(), 'sp_SOTMMonth', true);
- if ($today == $meta){ ?>
- <img src="<?php bloginfo('template_url'); ?>/images/SOM_Seal.png" />
- <?php } ?>
- </div>
- <?php endforeach;?>
- <?php wp_reset_postdata(); ?>
- </div> <!-- supplierHeader -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement