header - Wordpress change logo of certain page -
header - Wordpress change logo of certain page -
i using wordpress , want have different page logo 2 pages.
i have created kid theme , within functions.php file have added code:
<?php if ( ! function_exists( 'wpex_header_logo_img' ) && is_page(877) || ! function_exists( 'wpex_header_logo_img' ) && is_page(970)) { function wpex_header_logo_img() { // logo img admin panel $logo_img = wpex_option( 'custom_logo', false, 'http://amcham2.amcham.gr/wp-content/uploads/2014/09/business-branding-identity.jpg' ); // if logo url isn't empty homecoming logo if ( '' != $logo_img ) { homecoming $logo_img; } // otherwise if logo empty homecoming nil else { return; }}}?> i have not manged alter logo though.. know someting wrong in there not know what.
i want alter existing logo "http://amcham2.amcham.gr/wp-content/uploads/2014/09/business-branding-identity.jpg". help appreciated! give thanks you!
this original code:
if ( ! function_exists( 'wpex_header_logo_img' ) ) { function wpex_header_logo_img() { // logo img admin panel $logo_img = wpex_option( 'custom_logo', false, 'url' ); // if logo url isn't empty homecoming logo if ( '' != $logo_img ) { homecoming $logo_img; } // otherwise if logo empty homecoming nil else { return; } } }
by modify of logo section in header.php file (only logic, missing html code):
if ( is_page(877) ) { # image page } else if ( is_page(970) ) { # image page } else { # default logo } by original function in functions.php file (full response problem):
if ( ! function_exists( 'wpex_header_logo_img' ) ) { function wpex_header_logo_img() { if ( is_page(877) ) { $logo_img = 'image path page image'; } else if ( is_page(970) ) { $logo_img = 'image path page image'; } else { // logo img admin panel $logo_img = wpex_option( 'custom_logo', false, 'url' ); } // if logo url isn't empty homecoming logo if ( '' != $logo_img ) { homecoming $logo_img; } // otherwise if logo empty homecoming nil else { return; } } } wordpress header
Comments
Post a Comment