-1
저는 WordPress를 사용하고 있으며 2 개의 특정 페이지에 대해 다른 페이지 로고를 갖고 싶습니다. 내가가 someting가 있지만에서 잘못 알고 ..특정 페이지의 Wordpress 로고 변경
<?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() {
// Get logo img from 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 return the logo
if ('' != $logo_img) {
return $logo_img;
}
// Otherwise if logo is empty return nothing
else {
return;
}}}?>
그래도 난 로고를 변경 manged했던하지 않은 :
나는 아이 테마를 만들었와 Functions.php 파일 내부에이 코드를 추가 한 뭔지 몰라.
기존 로고를 "http://amcham2.amcham.gr/wp-content/uploads/2014/09/business-branding-identity.jpg"으로 변경하고 싶습니다. 도움을 주시면 감사하겠습니다. 고맙습니다! header.php 파일의 로고 부분 (만 논리, 그 HTML 코드 누락)의 수정으로
if (! function_exists('wpex_header_logo_img')) {
function wpex_header_logo_img() {
// Get logo img from admin panel
$logo_img = wpex_option('custom_logo', false, 'url');
// If logo URL isn't empty return the logo
if ('' != $logo_img) {
return $logo_img;
}
// Otherwise if logo is empty return nothing
else {
return;
}
}
}
응답을위한 Thx. 내가 header.php에서이로 변경 '경우 (! function_exists ('wpex_header_logo_img')) { \t 기능 wpex_header_logo_img() { \t \t $ logo_img = wpex_option ('custom_logo'거짓 'URL') ; \t \t 경우 (is_page (877)) { \t \t \t $ logo_img = wpex_option ('custom_logo', 진정한 'http://amcham2.amcham.gr/wp-content/uploads/2014/09/business-branding- identity.jpg '); \t \t} 다른 경우 (is_page (970)) { \t \t \t $ logo_img = wpex_option ('custom_logo', 진정한 'http://amcham2.amcham.gr/wp-content/uploads/2014/09/business -branding-identity.jpg '); \t \t \t \t \t else {return $ logo_img; \t} \t} }'행운 – Lambros
다시 확인 내 응답 . 내가 요청한 기능으로 업데이트했다. 문제없이 작동해야합니다.) – c0utinh0
wow thx! 그 작품! :) – Lambros