Last active
November 22, 2018 23:38
-
-
Save jamesfosker/329d7ab89a1ed702aa723c72645d909d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function custom_divi_header() { | |
//Insert HTML here | |
} | |
add_action( 'et_html_main_header', 'custom_divi_header' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$logo = ( $user_logo = et_get_option( 'divi_logo' ) ) && '' != $user_logo | |
? $user_logo | |
: $template_directory_uri . '/images/logo.png'; | |
ob_start(); | |
?> | |
<div class="logo_container"> | |
<span class="logo_helper"></span> | |
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"> | |
<img src="<?php echo esc_attr( $logo ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" id="logo" data-height-percentage="<?php echo esc_attr( et_get_option( 'logo_height', '54' ) ); ?>" /> | |
</a> | |
</div> | |
<?php | |
$logo_container = ob_get_clean(); | |
/** | |
* Filters the HTML output for the logo container. | |
* | |
* @since ?? | |
* | |
* @param string $logo_container | |
*/ | |
echo apply_filters( 'et_html_logo_container', $logo_container ); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function custom_divi_header() { | |
echo do_shortcode('[et_pb_section global_module="xxx"][/et_pb_section]'); // Change XXX to library items id (you can find the library item id when editing the library item if you look in the url bar you will see number after .mysite.com/wp-admin/post.php?post=xxx ) | |
} | |
add_action( 'et_html_main_header', 'custom_divi_header' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment