i'm a beginner in code and even if people have probably answered this question i don't know how to implement it in my case...
in my wordpress, i have a woocommerce integrated and i would like to display a different header logo then the home page.
i have found the place where it is called but i dont know how to implement it correctly and not scrap all the code.
i would probably want something like this
<?php if (isset($class) && $class == 'woocommerce'): ?>
<img src="images/logo-with-white-text" />
<?php else: ?>
<img src="images/logo-with-dark-text" />
<?php endif; ?>
implemented in this code from my theme
<!-- START LOGO -->
<div id="logo" class="<?php echo $width_tagline ?>" >
<?php
if( yit_get_option( 'header-custom-logo' ) == 'yes' && yit_get_option( 'header-custom-logo-image' ) != '' ) : ?>
<a id="logo-img" href="<?php echo home_url() ?>" title="<?php bloginfo( 'name' ) ?>">
<?php $size = #getimagesize(yit_get_option( 'header-custom-logo-image' )); ?>
<img class="no-dark" src="<?php echo yit_ssl_url( yit_get_option( 'header-custom-logo-image' ) ) ?>" <?php if( yit_get_option( 'logo-retina-url' ) ): ?>data-at2x="<?php echo yit_ssl_url( yit_get_option( 'logo-retina-url' ) ) ?>"<?php endif ?>title="<?php bloginfo( 'name' ) ?>" alt="<?php bloginfo( 'name' ) ?>" <?php if( !empty($size) && isset($size[3] ) ) echo $size[3] ?> />
<?php if ( 'yes' == YIT_Layout()->enable_dark_header ) : ?>
<?php $size = #getimagesize(yit_get_option( 'header-dark-custom-logo-image' )); ?>
<img class="only-dark" src="<?php echo yit_ssl_url( yit_get_option( 'header-dark-custom-logo-image' ) ) ?>" title="<?php bloginfo( 'name' ) ?>" alt="<?php bloginfo( 'name' ) ?>" <?php if( !empty($size) && isset($size[3] ) ) echo $size[3] ?> />
<?php endif; ?>
</a>
<?php else : ?>
<a id="textual" href="<?php echo home_url() ?>" title="<?php echo str_replace( array( '[', ']' ), '', bloginfo( 'name' ) ) ?>">
<?php echo yit_decode_title( get_bloginfo( 'name' ) ) ?>
</a>
<?php endif ?>
<?php
if( yit_get_option( 'header-logo-tagline' ) == 'yes' ):
$class = array();
if ( strpos( get_bloginfo( 'description' ), '|') ) $class[] = 'multiline';
if ( yit_get_option('header-logo-tagline-mobile') == 'no' ) $class[] = 'hidden-xs';
$class = ! empty( $class ) ? ' class="' . implode( $class, ' ' ) . '"' : '';
?>
<?php yit_string( "<p id='tagline'{$class}>", yit_decode_title( get_bloginfo( 'description' ) ), '</p>' );?>
<?php endif ?>
</div>
<!-- END LOGO -->
I hope someone will be kind enough to help me out on this one!
Thanks in advance
My way doing this
<a href="<?php echo home_url(); ?>" class="logo_link">
<img src="<?php echo get_template_directory_uri(); ?>/assets/images/logo.png" data-src="<?php echo get_template_directory_uri(); ?>/assets/images/logo-wc.png" alt="" class="logo">
</a>
<script>
$( document ).ready(function() {
if($('body').hasClass('woocommerce')) {
$('.logo_link img').attr('src', $(this).data('src'));
}
});
</script>
If woocommerce is installed and activated you can do this
<?php if(is_woocommerce()){ ?>
<img src="images/logo-with-white-text" />
<?php }else{ ?>
<img src="images/logo-with-white-text" />
<?php } ?>
Related
header.php question here. I have a custom logo being used on a specific set of listings pages https://carolroyseteam.com/our-nice-home/ , I've assigned it using a body class assignment to swap the header $logo in the header.php. Then the rest of the site with the branding of the domain https://carolroyseteam.com/. Is there anything that can be done to assign a different url to the two $logo's?
To clarify my custom logo for Our Nice homes logo goes to '/our-nice-home/' and then have standard domain home logo link to the default logo cotainer ">
Using Divi Theme
<?php ob_start(); ?>
<header id="main-header" data-height-onload="<?php echo esc_attr( et_get_option( 'menu_height', '66' ) ); ?>">
<div class="container clearfix et_menu_container">
<?php
$logo = ( $user_logo = et_get_option( 'divi_logo' ) ) && ! empty( $user_logo )
? $user_logo
: $template_directory_uri . '/images/logo.png';
ob_start();
?>
<?php
$classes = get_body_class();
if (in_array('ournicehomeslogo',$classes)) {
$logo="/wp-content/uploads/2019/10/1-ONH-Logo-05-carolroyseteam.png";}
?>
<?php
$classes = get_body_class();
if (in_array('single-listing',$classes)) {
$logo="/wp-content/uploads/2019/10/1-ONH-Logo-05-carolroyseteam.png";}
?>
<?php
$classes = get_body_class();
if (in_array('search-results',$classes)) {
$logo="/wp-content/uploads/2019/10/1-ONH-Logo-05-carolroyseteam.png";}
?>
<div class="logo_container">
<span class="logo_helper"></span>
<a href="/our-nice-homes/">
<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();
Got it! Wordpress Divi Theme users will appreciate that this logo_container is a default in the header.php file. This has been the easiest way to both custom logo a specific page or pages and then modify the home url.
<div class="logo_container">
<span class="logo_helper"></span>
<a href="<?php $classes = get_body_class();
if (in_array('ournicehomeslogo',$classes)) {
echo esc_url( home_url( '/our-nice-homes/' ) );}
else if (in_array('single-listing',$classes)) {
echo esc_url( home_url( '/our-nice-homes/' ) );}
else if (in_array('search-results',$classes)) {
echo esc_url( home_url( '/our-nice-homes/' ) );}
else{
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();
I have h1 title i put in my home page, but i want to keep it only in my home page. now it shows in
every single page in the site
im using wordpress and i put it in the header php
<?php
get_template_part( 'framework/parts/breaking-news' ); // Get Breaking News template
tie_banner('banner_below_header' , '<div class="e3lan e3lan-below_header">' , '</div>' );
?>
**<h1 style="padding-left:25px; padding-bottom:5px">stiri sportive</h1>**
this is all the header.php code
<!DOCTYPE html>
<html <?php language_attributes(); ?> prefix="og: http://ogp.me/ns#">
<head>
<meta name="google-site-verification" content="PUSf9MdDStKBNkOow1SskiNxuNcQOOzCf7ruKMyjCyE" />
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php wp_head(); ?>
</head>
<?php global $is_IE ?>
<body id="top" <?php body_class(); ?>>
<div class="wrapper-outer">
<?php if( tie_get_option('banner_bg_url') && tie_get_option('banner_bg') ): ?>
<?php else: ?>
<div class="background-cover"></div>
<?php endif; ?>
<?php if( tie_get_option( 'mobile_menu_active' ) ): ?>
<aside id="slide-out">
<?php if( tie_get_option( 'mobile_menu_search' ) ): ?>
<div class="search-mobile">
<form method="get" id="searchform-mobile" action="<?php echo home_url(); ?>/">
<button class="search-button" type="submit" value="<?php if( !$is_IE ) _eti( 'Search' ) ?>"><i class="fa fa-search"></i></button>
<input type="text" id="s-mobile" name="s" title="<?php _eti( 'Search' ) ?>" value="<?php _eti( 'Search' ) ?>" onfocus="if (this.value == '<?php _eti( 'Search' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _eti( 'Search' ) ?>';}" />
</form>
</div><!-- .search-mobile /-->
<?php endif; ?>
<?php if( tie_get_option('mobile_menu_social') ):
tie_get_social( true , false , 'ttip-none' ); ?>
<?php endif; ?>
<div id="mobile-menu" <?php if( !tie_get_option('mobile_menu_hide_icons') ) echo' class="mobile-hide-icons"';?>></div>
</aside><!-- #slide-out /-->
<?php endif; ?>
<?php $full_width =''; if( tie_get_option( 'full_logo' )) $full_width = ' full-logo';
$center_logo =''; if( tie_get_option( 'center_logo' )) $center_logo = ' center-logo';
$theme_layout = 'boxed';
if( tie_get_option( 'theme_layout' ) == 'full' ) $theme_layout = 'wide-layout';
if( tie_get_option( 'theme_layout' ) == 'boxed-all' ) $theme_layout = 'boxed-all';
?>
<div id="wrapper" class="<?php echo $theme_layout ?>">
<div class="inner-wrapper">
<header id="theme-header" class="theme-header<?php echo $full_width.$center_logo ?>">
<?php if( tie_get_option( 'top_menu' ) ): ?>
<div id="top-nav" class="top-nav">
<div class="container">
<?php if(tie_get_option( 'top_date' )):
if( tie_get_option('todaydate_format') ) $date_format = tie_get_option('todaydate_format');
else $date_format = 'l , j F Y';
?>
<span class="today-date"><?php echo date_i18n( $date_format , current_time( 'timestamp' ) ); ?></span><?php endif; ?>
<?php wp_nav_menu( array( 'container_class' => 'top-menu', 'theme_location' => 'top-menu' ) ); ?>
<?php if( tie_get_option( 'top_search' ) ): ?>
<div class="search-block">
<form method="get" id="searchform-header" action="<?php echo home_url(); ?>/">
<button class="search-button" type="submit" value="<?php if( !$is_IE ) _eti( 'Search' ) ?>"><i class="fa fa-search"></i></button>
<input class="search-live" type="text" id="s-header" name="s" title="<?php _eti( 'Search' ) ?>" value="<?php _eti( 'Search' ) ?>" onfocus="if (this.value == '<?php _eti( 'Search' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _eti( 'Search' ) ?>';}" />
</form>
</div><!-- .search-block /-->
<?php endif;
if( tie_get_option('top_social') ):
tie_get_social( true , false , 'ttip-none' ); ?>
<?php endif; ?>
<?php tie_language_selector_flags(); ?>
</div><!-- .container /-->
</div><!-- .top-menu /-->
<?php endif; ?>
<div class="header-content">
<?php if( tie_get_option( 'mobile_menu_active' ) ): ?>
<a id="slide-out-open" class="slide-out-open" href="#"><span></span></a>
<?php endif; ?>
<?php
if( is_category() || is_single() ){
if( is_category() ) $category_id = get_query_var('cat') ;
if( is_single() ){
$categories = get_the_category( $post->ID );
if( !empty( $categories[0]->term_id ) )
$category_id = $categories[0]->term_id ;
}
if( !empty( $category_id ) ){
$tie_cats_options = get_option( 'tie_cats_options' );
if( !empty( $tie_cats_options[ $category_id ] ) )
$cat_options = $tie_cats_options[ $category_id ];
}
}
if( !empty($cat_options['cat_custom_logo']) ){
$logo_margin ='';
if( !empty( $cat_options['logo_margin'] ) || !empty( $cat_options['logo_margin_bottom'] ) ){
$logo_margin = ' style="';
if( !empty( $cat_options['logo_margin'] ) )
$logo_margin .= ' margin-top:'.$cat_options['logo_margin'].'px;';
if( !empty( $cat_options['logo_margin_bottom'] ) )
$logo_margin .= ' margin-bottom:'.$cat_options['logo_margin_bottom'].'px;';
$logo_margin .= '"';
}
?>
<div class="logo"<?php echo $logo_margin ?>>
<h2>
<?php if( $cat_options['logo_setting'] == 'title' ): ?>
<?php echo single_cat_title( '', false ) ?>
<?php else : ?>
<?php if( !empty($cat_options['logo']) ) $logo = $cat_options['logo'];
elseif( tie_get_option( 'logo' ) ) $logo = tie_get_option( 'logo' );
else $logo = get_stylesheet_directory_uri().'/images/logo.png';
?>
<a title="<?php bloginfo('name'); ?>" href="<?php echo home_url(); ?>/">
<img src="<?php echo $logo ; ?>" alt="<?php echo single_cat_title( '', false ) ?>" <?php if( $cat_options['logo_retina_width'] && $cat_options['logo_retina_height'] ) echo 'width="'.$cat_options['logo_retina_width'] .'" height="'.$cat_options['logo_retina_height'].'"'; ?> /><strong><?php echo single_cat_title( '', false ) ?></strong>
</a>
<?php endif; ?>
</h2>
</div><!-- .logo /-->
<?php if( $cat_options['logo_retina'] && $cat_options['logo_retina_width'] && $cat_options['logo_retina_height']): ?>
<script type="text/javascript">
jQuery(document).ready(function($) {
var retina = window.devicePixelRatio > 1 ? true : false;
if(retina) {
jQuery('#theme-header .logo img').attr('src', '<?php echo $cat_options['logo_retina']; ?>');
jQuery('#theme-header .logo img').attr('width', '<?php echo $cat_options['logo_retina_width']; ?>');
jQuery('#theme-header .logo img').attr('height', '<?php echo $cat_options['logo_retina_height']; ?>');
}
});
</script>
<?php endif; ?>
<?php
}else{
$logo_margin ='';
if( tie_get_option( 'logo_margin' ) || tie_get_option( 'logo_margin_bottom' ) ){
$logo_margin = ' style="';
if( tie_get_option( 'logo_margin' ) )
$logo_margin .= ' margin-top:'.tie_get_option( 'logo_margin' ).'px;';
if( tie_get_option( 'logo_margin_bottom' ) )
$logo_margin .= ' margin-bottom:'.tie_get_option( 'logo_margin_bottom' ).'px;';
$logo_margin .= '"';
}
?>
<div class="logo"<?php echo $logo_margin ?>>
<?php if( is_home() || is_front_page() ) echo '<img>'; else echo '<img>'; ?>
<?php if( tie_get_option('logo_setting') == 'title' ): ?>
<?php bloginfo('name'); ?>
<span><?php bloginfo( 'description' ); ?></span>
<?php else : ?>
<?php if( tie_get_option( 'logo' ) ) $logo = tie_get_option( 'logo' );
else $logo = get_stylesheet_directory_uri().'/images/logo.png';
?>
<a title="<?php bloginfo('name'); ?>" href="<?php echo home_url(); ?>/">
<img src="<?php echo $logo ; ?>" alt="<?php bloginfo('name'); ?>" <?php if( tie_get_option('logo_retina_width') && tie_get_option('logo_retina_height') ) echo 'width="'.tie_get_option('logo_retina_width') .'" height="'.tie_get_option('logo_retina_height').'"'; ?> /><strong><?php bloginfo('name'); ?> <?php bloginfo( 'description' ); ?></strong>
</a>
<?php endif; ?>
<?php if( is_home() || is_front_page() ) echo '</img>'; else echo '</img>'; ?>
</div><!-- .logo /-->
<?php if( tie_get_option( 'logo_retina' ) && tie_get_option( 'logo_retina_width' ) && tie_get_option( 'logo_retina_height' )): ?>
<script type="text/javascript">
jQuery(document).ready(function($) {
var retina = window.devicePixelRatio > 1 ? true : false;
if(retina) {
jQuery('#theme-header .logo img').attr('src', '<?php echo tie_get_option( 'logo_retina' ); ?>');
jQuery('#theme-header .logo img').attr('width', '<?php echo tie_get_option( 'logo_retina_width' ); ?>');
jQuery('#theme-header .logo img').attr('height', '<?php echo tie_get_option( 'logo_retina_height' ); ?>');
}
});
</script>
<?php endif; ?>
<?php } ?>
<?php tie_banner('banner_top' , '<div class="e3lan e3lan-top">' , '</div>' ); ?>
<div class="clear"></div>
</div>
<?php $stick = ''; ?>
<?php if( tie_get_option( 'stick_nav' ) ) $stick = ' class="fixed-enabled"' ?>
<?php if( tie_get_option( 'main_nav' ) ): ?>
<?php
//UberMenu Support
$navID = 'main-nav';
if ( class_exists( 'UberMenu' ) ){
$uberMenus = get_option( 'wp-mega-menu-nav-locations' );
if( !empty($uberMenus) && is_array($uberMenus) && in_array("primary", $uberMenus)) $navID = 'main-nav-uber';
}?>
<nav id="<?php echo $navID; ?>"<?php echo $stick; ?>>
<div class="container">
<?php if( tie_get_option( 'nav_logo' ) ): ?>
<a class="main-nav-logo" title="<?php bloginfo('name'); ?>" href="<?php echo home_url(); ?>/">
<img src="<?php echo tie_get_option( 'nav_logo' ) ?>" width="195" height="54" alt="<?php bloginfo('name'); ?>">
</a>
<?php endif ?>
<?php wp_nav_menu( array( 'container_class' => 'main-menu', 'theme_location' => 'primary', 'walker' => new tie_mega_menu_walker(), 'fallback_cb'=> false) ); ?>
<?php if(tie_get_option( 'random_article' )): ?>
<i class="fa fa-random"></i>
<?php endif ?>
<?php if( tie_get_option( 'shopping_cart' ) && function_exists( 'is_woocommerce' ) ):
global $woocommerce; ?>
<a class="tie-cart ttip" href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _eti( 'View your shopping cart' ); ?>"><span class="shooping-count-outer"><?php if( isset( $woocommerce->cart->cart_contents_count ) && ( $woocommerce->cart->cart_contents_count != 0 ) ){ ?><span class="shooping-count"><?php echo $woocommerce->cart->cart_contents_count ?></span><?php } ?><i class="fa fa-shopping-cart"></i></span></a>
<?php endif ?>
</div>
</nav><!-- .main-nav /-->
<?php endif; ?>
</header><!-- #header /-->
<?php get_template_part( 'framework/parts/breaking-news' ); // Get Breaking News template ?>
<?php tie_banner('banner_below_header' , '<div class="e3lan e3lan-below_header">' , '</div>' ); ?>
<h1 style="padding-left:25px; padding-bottom:5px">stiri sportive</h1>
<?php
$sidebar = '';
if( tie_get_option( 'sidebar_pos' ) == 'left' ) $sidebar = ' sidebar-left';
if( is_singular() || ( function_exists( 'is_woocommerce' ) && is_woocommerce() ) ){
$current_ID = $post->ID;
if( function_exists( 'is_woocommerce' ) && is_woocommerce() ) $current_ID = woocommerce_get_page_id('shop');
$get_meta = get_post_custom( $current_ID );
if( !empty($get_meta["tie_sidebar_pos"][0]) ){
$sidebar_pos = $get_meta["tie_sidebar_pos"][0];
if( $sidebar_pos == 'left' ) $sidebar = ' sidebar-left';
elseif( $sidebar_pos == 'full' ) $sidebar = ' full-width';
elseif( $sidebar_pos == 'right' ) $sidebar = ' sidebar-right';
}
}
if( ( function_exists('is_bbpress') && is_bbpress() && tie_get_option( 'bbpress_full' )) || is_404() ) $sidebar = ' full-width';
?>
<div id="main-content" class="container<?php echo $sidebar ; ?>">
what to add to the code so the title will show only in the homepage
You could wrap the h1 in an if statement using is_home() and is_frontpage().
<?php if( is_home() || is_front_page() ) : ?>
<h1 style="padding-left:25px; padding-bottom:5px">stiri sportive</h1>
<?php endif; ?>
is_home() returns true or false depending on whether the page being shown is the 'Front Page' or not.
You should consider restructuring things though, so that this forms part of the home page template, rather than being run on every page of your website.
is_home() docs: https://developer.wordpress.org/reference/functions/is_home/
You can wrap your <h1> tag with a conditional statement checking whether the page is the homepage or not:
<?php if ( is_home() || is_front_page() ) { ?>
<h1 style="padding-left:25px; padding-bottom:5px">stiri sportive</h1>
<?php } ?>
This way, the H1 tag will only show on the website's homepage.
I don't understand how I get an default image from theme folder when Option Tree logo is not selected.
<div id="logo-section">
<?php if ( function_exists( 'ot_get_option' ) ) : ?>
<?php $logo = ot_get_option( 'pp_logo_upload' ); ?>
<a href="<?php bloginfo('url'); ?>">
<img src="<?php echo $logo; ?>" class="logo" />
</a>
<?php endif; ?>
Option Tree accepts a second parameter for ot_get_option that is the default in case no option is saved.
<?php if ( function_exists( 'ot_get_option' ) && ( $logo = ot_get_option( 'pp_logo_upload', 'some-image.png' ) ) != '' ){ ?>
<div id="logo-section">
<img src="<?php echo esc_attr( $logo ); ?>" class="logo" />
</div>
<?php } ?>
If anyone can help it would be much appreciated. I'm working on a Wordpress site and I have a header image on the homepage. It's only showing up on the homepage but I need it to show on every page. I found this code in the header.php file which I believe needs to be changed, but I'm not very familiar with php.
This is the code for the header image in the header.php file:
<?php if ( is_home() || is_front_page() ) { ?>
<?php if ( get_header_image() != '' && $papercuts_options_db['papercuts_display_header_image'] != 'Everywhere except Homepage' ) { ?>
<div class="header-image-wrapper"><div class="header-image"><img src="<?php header_image(); ?>" alt="<?php bloginfo( 'name' ); ?>" /></div></div>
<?php
}
} else { ?>
<?php if ( get_header_image() != '' && $papercuts_options_db['papercuts_display_header_image'] != 'Only on Homepage' ) { ?>
<div class="header-image-wrapper"><div class="header-image"><img src="<?php header_image(); ?>" alt="<?php bloginfo( 'name' ); ?>" /></div></div>
<?php }
} ?>
Replace the code with this:
<?php
if ( get_header_image() != '' ) {
?>
<div class="header-image-wrapper"><div class="header-image"><img src="<?php header_image(); ?>" alt="<?php bloginfo( 'name' ); ?>" /></div></div>
<?php
}
?>
And ideally keep the original code but commented out - use:
<?php
/*
if ( is_home() || is_front_page() ) { ?>
<?php if ( get_header_image() != '' && $papercuts_options_db['papercuts_display_header_image'] != 'Everywhere except Homepage' ) { ?>
<div class="header-image-wrapper"><div class="header-image"><img src="<?php header_image(); ?>" alt="<?php bloginfo( 'name' ); ?>" /></div></div>
<?php
}
} else { ?>
<?php if ( get_header_image() != '' && $papercuts_options_db['papercuts_display_header_image'] != 'Only on Homepage' ) { ?>
<div class="header-image-wrapper"><div class="header-image"><img src="<?php header_image(); ?>" alt="<?php bloginfo( 'name' ); ?>" /></div></div>
<?php }
}
*/ ?>
For reference
<?php if ( get_header_image() !='') { ?>
<div class="header-image-wrapper"><div class="header-image"><img src="<?php header_image(); ?>" alt="<?php bloginfo( 'name' ); ?>" /></div></div>
<?php
} ?>
Replace the code with above. I think it will work.
I trying to display a different logo for a page in a wordpress site.
I have the default Logo theme, and i want to insert a different logo for a page.
here is the code that manage the logo display in the theme file:
<a href="<?php echo home_url() ?>/" title="<?php bloginfo( 'name' ) ?>" class="logo <?php if ( empty( $logo ) || $logo_type === 'site-title' ) echo 'text-logo' //xss ok ?>" style="min-width:<?php echo $logo_size['width'] / 2 // xss ok ?>px"><?php
if ( $logo && $logo_type === 'image' ):
?>
<img src="<?php echo esc_url( $logo ) ?> " alt="<?php bloginfo( 'name' )?>" class="normal-logo" height="<?php if ( ! empty( $logo_size['height'] ) ) echo $logo_size['height']/2 // xss ok ?>" style="<?php echo esc_attr( $logo_style ) ?>"/>
<?php
else:
bloginfo( 'name' );
endif;
?
I want to insert a condtional tags function after the img src= like this:
else if(is_page('Name-Page')){
echo '<img src="images/logo-for-page.png" />';
}
I try to insert the funcion directly after the img src but t doesn't work.
Any idea? thank you
<img src="<?php echo ( is_page('Name-Page') ? "images/logo-for-page.png" : esc_url( $logo ) ) ?>" ....