Advertisement
Guest User

image-promotion.php

a guest
Apr 28th, 2022
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.20 KB | None | 0 0
  1. <?php
  2. /**
  3. * The template used for displaying promotion headline
  4. *
  5. * @package Catch_Inspire
  6. */
  7. ?>
  8. <?php
  9.  
  10. $image_align = get_theme_mod( 'catch_inspire_promotion_headline_image_position', 'content-align-center' );
  11.  
  12. $class[] = 'section';
  13. $class[] = $image_align;
  14.  
  15. if ( get_theme_mod( 'catch_inspire_promotion_headline_wrap_text', 1 ) ) {
  16. $class[] = 'content-frame';
  17. }
  18. elseif ( get_theme_mod( 'catch_inspire_promotion_headline_text_color', 1 ) ) {
  19. $class[] = 'content-color-white';
  20. }
  21. $class[] = 'promotion-headline-one';
  22. ?>
  23. <div id="promotion-section" class="<?php echo esc_attr( implode( ' ', $class ) ); ?>">
  24. <div class="wrapper section-content-wrapper promotion-content-wrapper">
  25. <article class="hentry type-image promotion-headline-image">
  26. <div class="hentry-inner">
  27. <?php
  28. $image = get_theme_mod( 'catch_inspire_promotion_headline_image' );
  29. if ( $image ) : ?>
  30. <div class="post-thumbnail-background" style="background-image: url( '<?php echo esc_url( $image ); ?>' )">
  31. <?php
  32. $link = get_theme_mod( 'catch_inspire_promotion_headline_link', '#' );
  33. $target = get_theme_mod( 'catch_inspire_promotion_headline_target' ) ? '_blank' : '_self';
  34. ?>
  35. <a class="cover-link" href="<?php echo esc_url( $link ); ?>" target="<?php echo esc_attr( $target ); ?>">
  36. </a>
  37. </div><!-- .post-thumbnail-background -->
  38. <?php endif; ?>
  39.  
  40. <div class="content-wrapper">
  41. <div class="entry-container">
  42. <div class="entry-container-frame">
  43. <?php if ( $title = get_theme_mod( 'catch_inspire_promotion_headline_title' ) ) : ?>
  44. <header class="entry-header section-title-wrapper">
  45. <h2 class="entry-title section-title ">
  46. <?php echo wp_kses_post( $title ); ?>
  47. </h2>
  48. </header><!-- .entry-header -->
  49. <?php endif; ?>
  50.  
  51. <?php if ( $content = get_theme_mod( 'catch_inspire_promotion_headline_content' ) ) : ?>
  52. <div class="entry-content">
  53. <?php echo wp_kses_post( $content ); ?>
  54.  
  55. <?php
  56. $more_text = get_theme_mod( 'catch_inspire_promotion_headline_more_text' );
  57. $more_link = get_theme_mod( 'catch_inspire_promotion_headline_more_link', '#' );
  58. $more_target = get_theme_mod( 'catch_inspire_promotion_headline_more_target' ) ? '_blank' : '_self' ;
  59.  
  60. ?>
  61.  
  62. <div class="buttons">
  63. <?php if ( $more_text ) : ?>
  64. <a class="more-link" href="<?php echo esc_url( $more_link ); ?>" target="<?php echo esc_attr( $more_target ); ?>">
  65. <span class="more-button"><?php echo esc_html( $more_text ); ?></span>
  66. </a>
  67. <?php
  68. endif;
  69. ?>
  70. <a class="more-link" href="<?php echo esc_url( 'https://www.instagram.com/' ); ?>" target="_blank">
  71. <span class="more-button"><?php echo esc_html( 'Click Here' ); ?></span>
  72. </a>
  73. </div>
  74. </div><!-- .entry-content -->
  75. <?php endif; ?>
  76. </div><!-- .entry-container-frame -->
  77. </div><!-- .entry-container -->
  78. </div><!-- .content-wrapper -->
  79. </div><!-- .hentry-inner -->
  80. </article><!-- #post-## -->
  81. </div><!-- .section-content-wrap -->
  82. </div><!-- .section -->
  83.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement