Guest User

Untitled

a guest
Jan 22nd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. <?php if ( is_front_page() ) {?>
  2. <div class="hero-header">
  3. <?php if (get_field('project_name')): ?>
  4. <h1><?php the_field('project_name');?></h1>
  5. <?php endif;?>
  6.  
  7. <?php if (get_field('protect_hero_header_2')): ?>
  8. <h1><?php the_field('protect_hero_header_2');?></h1>
  9. <?php endif;?>
  10. </div>
  11. <?php
  12. } else {?>
  13. <div class="hero-header">
  14. <?php $project_logo = get_field('project_logo'); ?>
  15. <img src="<?php if( !empty($project_logo) ): echo $project_logo['url']; ?>" alt="<?php echo $project_logo['alt']; endif;?>" />
  16. </div>
  17. <?php } ?>
  18.  
  19.  
  20.  
  21.  
  22. <div class="hero-header">
  23. <?php if (get_field('project_name')): ?>
  24. <h1><?php the_field('project_name');?></h1>
  25. <?php endif;?>
  26.  
  27. <?php if (get_field('protect_hero_header_2')): ?>
  28. <h1><?php the_field('protect_hero_header_2');?></h1>
  29. <?php endif;?>
  30.  
  31. <?php if ( is_singular( 'project' ) ) : ?>
  32. <?php $project_logo = get_field('project_logo'); ?>
  33. <img src="<?php if( !empty($project_logo) ): echo $project_logo['url']; ?>" alt="<?php echo $project_logo['alt']; endif;?>" />
  34. <?php endif; ?>
  35. </div>
Add Comment
Please, Sign In to add comment