2016-11-02 1 views
1

나는 다음과 같은 명령을 WordPress 테마에서 가지고있다.php와 html을 함께 사용하여 웹 페이지의 헤더를 편집하는 방법

</head> 

<body <?php body_class(); ?>> 


<header id="masthead" class="site-header <?php echo (get_theme_mod('panoramic-header-layout', 'panoramic-header-layout-standard') == 'panoramic-header-layout-centered') ? sanitize_html_class('panoramic-header-layout-centered') : sanitize_html_class('panoramic-header-layout-standard'); ?>" role="banner"> 



<?php if (get_theme_mod('panoramic-header-layout', 'panoramic-header-layout-standard') == 'panoramic-header-layout-centered') : ?> 

    <?php get_template_part('library/template-parts/header', 'centered'); ?> 

<?php else : ?> 

    <?php get_template_part('library/template-parts/header', 'centered'); ?> 

<?php endif; ?> 

두 개의 로고를 추가해야합니다. 하나는 왼쪽에 있고 다른 하나는 오른쪽에 추가해야합니다.

어떻게 수행하나요?

+0

테마 문서를 읽어야합니다. –

+1

두 개의 로고를 HTML 코드에 직접 추가하기 만하면됩니다. –

답변

1

댓글 섹션에서 언급했듯이 아이콘을 HTML 섹션에 추가하고 테마 관련 이미지를 삭제하기 만하면됩니다.

HTML 부분 : 로고 파일 정렬

<header> 
    <img class="logo left" src="PATH_TO_LEFT_LOGO.png"> 
    <div class="header-text left"> 
    This may be a title. 
    </div> 
    <img class="logo right" src="PATH_TO_RIGHT_LOGO.png"> 
    <br class="header-clear" /> 
</header> 

CSS : 다음은이 작업을 수행 할 수있는 방법을 보여주는 샘플의 머리글 텍스트를 필요로하지 않는 경우

.header-text { 
    color: white; 
    margin: 5px; 
    font-size: 20px; 
} 
.header-text.left, 
.logo.left{ 
    float: left; 
} 
.logo.right { 
    float: right; 
} 
.header-clear { 
    clear: both; 
} 

이의 제거 DIV 레이어 및 CSS 섹션의 적절한 규칙을 참조하십시오. 또한 구성과 일치하는 로고 이미지의 경로를 바꿔야한다는 것도 분명해야합니다 .-

Here's a fiddle 위의 코드가 나와 있습니다.

관련 문제