Skip to content

Instantly share code, notes, and snippets.

@eri-trabiccolo
Created April 9, 2015 08:06
Show Gist options
  • Select an option

  • Save eri-trabiccolo/71dec0ae1ffaf25bf954 to your computer and use it in GitHub Desktop.

Select an option

Save eri-trabiccolo/71dec0ae1ffaf25bf954 to your computer and use it in GitHub Desktop.
Image in tagline
add_filter( 'tc_tagline_display' , 'my_image_in_tagline');
function my_image_in_tagline() {
global $wp_current_filter;
$image_src = 'http://presscustomizr.com/wp-content/uploads/2015/04/press-customizr-logo1.png';
$image_alt = 'My image';
$img = "<img src='$image_src' alt='$image_alt' class='my-img-tagline'>";
?>
<?php if ( !in_array( '__navbar' , $wp_current_filter ) ) :?>
<div class="container outside">
<div class="site-description">
<?php echo $img; ?>
</div>
</div>
<?php else : //when hooked on __navbar ?>
<div class="span7 inside site-description">
<?php echo $img; ?>
</div>
<?php endif; ?>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment