프로젝트1에서 게시글타이틀부분이 ㅜㅜ 갑자기 왜이렇게되는지 모르겠습니다
600
投稿した質問数 2
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요!
- 먼저 유사한 질문이 있었는지 검색해보세요.
- 서로 예의를 지키며 존중하는 문화를 만들어가요.
- 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.
46번째 줄 ? 코드라면
아래와같습니다
<div class="post-meta"> <?php echo get_avatar(get_the_author_meta('ID'), '18', $default, $alt, array('class' => array())); ?> <span class="post-author">
回答 4
0
<!DOCTYPE html> <html <?php language_attributes(); ?> > <head> <meta charset="<?php bloginfo('charset'); ?>"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> <?php wp_title('|', 'echo', 'right'); ?> <?php bloginfo('name') ?> </title> <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <div class="container"> <div class="section-content"> <?php if(!is_single()) { ?> <div class="section-header"> <?php if(is_archive()) { echo '<h2>'. get_the_archive_title() .'</h2>'; } else { echo '<h2>'. get_bloginfo('name') .'</h2>'; } ?> </div> <?php } ?> <?php if(have_posts()) { ?> <main> <?php echo (!is_home() ? '<a class="to-home" href="'. esc_url(site_url('/')) .'">« Back to Home</a>' : ''); ?> <?php while(have_posts()) { the_post(); ?> <article id="post"> <div class="post-header"> <h4> <?php if(!is_single()) { ?> <a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a> <?php } else { ?> <?php the_title(); ?> <?php } ?> </h4> <div class="post-meta"> <?php echo get_avatar(get_the_author_meta('ID'), '18', $default, $alt, array('class' => array())); ?> <span class="post-author"> <a href="<?php echo esc_url(get_author_posts_url(get_the_author_meta('ID'))); ?>"><?php echo get_the_author_meta('display_name'); ?></a> </span> | <span class="post-time"><?php the_time('Y-m-d'); ?></span> | Cat: <?php the_category(); ?> <?php echo (has_tag() ? '| Tag:' : ''); ?> <?php the_tags(); ?> <?php if(is_single()) { echo '|'; previous_post_link('%link', '« Prev'); next_post_link('%link', 'Next »'); } ?> </div> </div> <?php if(has_post_thumbnail()) { ?> <div class="post-body"> <?php if(!is_single()) { ?> <a href="<?php the_permalink(); ?>" class="post-featured"> <img src="<?php echo esc_url(wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'medium')[0]); ?>" alt="<?php echo get_post_meta(get_post_thumbnail_id($post->ID), '_wp_attachment_image_alt', true); ?>" class="post-featured-image"> </a> <?php } else { ?> <div class="post-featured"> <img src="<?php echo esc_url(wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'medium')[0]); ?>" alt="<?php echo get_post_meta(get_post_thumbnail_id($post->ID), '_wp_attachment_image_alt', true); ?>" class="post-featured-image"> </div> <?php } ?> <div class="post-text-with-featured"> <?php if(is_home() || is_archive()) { // the_excerpt(); if(has_excerpt()) { echo get_the_excerpt(); } else { echo wp_trim_words(get_the_content(), 30); } } elseif(is_single()) { the_content(); } ?> </div> </div> <?php } else { ?> <div class="post-body"> <div class="post-text-without-featured"> <?php if(is_home() || is_archive()) { if(has_excerpt()) { echo get_the_excerpt(); } else { echo wp_trim_words(get_the_content(), 30); } } elseif(is_single()) { the_content(); } ?> </div> </div> <?php } ?> </article> <?php } ?> </main> <div class="pagination"> <?php // next_posts_link('« Older'); // previous_posts_link('Newer »'); // posts_nav_link(); // echo paginate_links(); // Prior to WP 4.1 the_posts_pagination(); // For WP 4.1+ ?> </div> <?php } else { echo '<p>Sorry, no posts.</p>'; } ?> </div> </div> <?php wp_footer(); ?> </body> </html>
뉴스페이퍼 싱글템플릿 디자인 관련 상담 요청
0
27
2
폰트 업로드 단계에 설치해야할 플러그인이 현재 없습니다
0
49
2
FASTCOMET SSL 설정 방법 문의
0
54
2
엘리멘터
0
48
2
워드프레스로 웹사이트를 만드는 경우애도 HTML, CSS 코드를 직접 작성해야 하나요? 프로젝트 1번을 거의 다 들었는데 대부분 작업이 CSS코딩과 HTML코딩 같아서요
0
144
2
블로그 페이지 게시물 페이지 오류
0
179
2
71강 gallery-title 누락
0
162
2
vscode
0
132
1
22강 요약문
0
166
2
bootstrap_5_wp_nav_menu_walker()드랍다운 방식을 메가메뉴로 설정할 수 있나요?
0
178
1
single 포스트글에서 페이지의 Top-Banner이미지 불러오는 법
0
199
2
single 포스트글에서도 페이지의 $theParent를 가져오는 법
0
177
1
강의 프로젝트 연습용 세컨드 프로젝트 만드는 법
0
229
1
16강 브라우저에서 출력되는 var_dump() 데이터 자동정렬 툴
0
299
2
start site
0
264
1
wordpress에서 js파일 모듈작업
0
308
2
$post가 정의되어있지 않다는 메시지가 나오네요.
0
364
2
25강 - Post meta 부분 질문입니다.
0
304
1
관리자페이지 로그인이 안됩니다!
0
459
2
길이가 서로 틀려요
0
314
1
백그라운드 이미지ㅠㅠ
0
411
1
pagination 다음페이지에서 오류가 나는 경우
0
720
1
프로젝트 내에 있는 php파일을 a태그로 연결시킬 수 있을까요?
0
389
1
프로젝트4-마이그레이션 플러그인이 없어요..
0
304
1

