srikat icon

Untitled

srikat | PRO | 01/28/18 10:17:26 AM UTC | 0 ⭐ | 492 👁️ | Never ⏰ | []
text |

1.54 KB

|

None

|

0 👍

/

0 👎

add_filter( 'genesis_markup_site-header_open', 'insert_html_before_site_header_markup', 10, 2 );
/**
 * Appends HTML to the opening markup for .site-header.
 *
 * @param string $close_html HTML tag being processed by the API.
 * @param array  $args       Array with markup arguments.
 *
 * @return string
 */
function insert_html_before_site_header_markup( $open_html, $args ) {
	if ( $open_html ) {
		$additional_html = '<div class="sticky-header">';
 		$open_html =  $additional_html . $open_html;
	}
 	return $open_html;
}
 add_filter( 'genesis_markup_site-container_open', 'insert_html_before_site_container_markup', 10, 2 );
/**
 * Appends HTML to the opening markup for .site-container.
 *
 * @param string $close_html HTML tag being processed by the API.
 * @param array  $args       Array with markup arguments.
 *
 * @return string
 */
function insert_html_before_site_container_markup( $open_html, $args ) {
	if ( $open_html ) {
		$additional_html = '</div>';
 		$open_html =  $additional_html . $open_html;
	}
 	return $open_html;
}
 remove_action( 'genesis_header', 'genesis_header_markup_open', 5 );
remove_action( 'genesis_header', 'genesis_do_header' );
remove_action( 'genesis_header', 'genesis_header_markup_close', 15 );
remove_action( 'genesis_after_header', 'genesis_do_nav' );
 add_action( 'genesis_before', 'genesis_header_markup_open' );
add_action( 'genesis_before', 'genesis_do_header' );
add_action( 'genesis_before', 'genesis_header_markup_close' );
add_action( 'genesis_before', 'genesis_do_nav' );

Comments