top.php 1.0 KB

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * Actual, visible header. Includes the logo, menu, etc.
  4. * @package vamtam/consulting
  5. */
  6. $layout = rd_vamtam_get_option( 'header-layout' );
  7. $single_row = in_array( $layout, array( 'logo-menu', 'overlay-menu' ), true );
  8. if ( is_page_template( 'page-blank.php' ) ) return;
  9. $style_attr = '';
  10. if (
  11. rd_vamtam_get_optionb( 'sticky-header' ) &&
  12. vamtam_post_meta( null, 'sticky-header-type', true ) === 'over'
  13. ) {
  14. $style_attr .= 'height:0;';
  15. }
  16. wp_enqueue_script( 'vamtam-sticky-header' );
  17. ?>
  18. <div class="fixed-header-box sticky-header-state-reset" style="<?php echo esc_attr( $style_attr ) ?>">
  19. <header class="main-header layout-<?php echo esc_attr( $layout ) ?> <?php if ( $single_row ) echo 'layout-single-row header-content-wrapper' ?> <?php if ( $layout !== 'logo-text-menu' ) echo 'header-background' ?>">
  20. <?php get_template_part( 'templates/header/top/nav' ) ?>
  21. <?php get_template_part( 'templates/header/top/main', $layout ) ?>
  22. </header>
  23. <?php do_action( 'vamtam_header_box' ); ?>
  24. </div>