Skip to content

Instantly share code, notes, and snippets.

@ahmedeshaan
Created March 6, 2022 13:38
Show Gist options
  • Save ahmedeshaan/440669d8ad9b80a2a868c1b670c9f0ce to your computer and use it in GitHub Desktop.
Save ahmedeshaan/440669d8ad9b80a2a868c1b670c9f0ce to your computer and use it in GitHub Desktop.
<?php // Do not include this if already open!
/**
* Code goes in theme functions.php
*/
function holiday_message_before_header() {
?>
<div class="header-block">
<?php echo do_shortcode( '[block id="holidays-message"]' ); ?>
</div>
<?php
}
add_action( 'flatsome_before_header', 'holiday_message_before_header', 1 );
@ahmedeshaan
Copy link
Author

ahmedeshaan commented Mar 6, 2022

function holiday_message_before_header() {
	?>
	<div class="header-block">
		<?php if ( is_single() ) { echo do_shortcode( '[block id="blog-header"]' );}; ?>
	</div>
	<?php
}

add_action( 'flatsome_after_header', 'holiday_message_before_header', 1 );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment