Home 게시판 커뮤니티 Q&A 글 목록만 표시해줄때 archive.php 수정관련해서

1개 답변, 2 voices Last updated by Avatar of 082net082net 12 years, 11 months 전
  • Avatar of 원정식원정식
    Participant
    @원정식
    #4444

    테마는 http://fthemes.com/의 eco mode 테마입니다

    나름 검색도 해보고 관련글 찾아서 읽어봤는데

    테마마다 소스도 틀려서 뭐 어떻게 해야 할지 모르겠네요

    php 태그에서 이것도 지워보고 저것도 지워보고 새로고침해봐도

    뜨는건 오류메세지 난무 ㅡㅠ

    <?php get_template_part(‘content’, ‘before’); ?>

    <div class=”content”>
    <h2 class=”generic”><?php

    /* If this is a category archive */
    if (is_category()) { printf( __( ‘Category Archives: <span>%s</span>’, ‘themater’ ), single_cat_title( ”, false ) );
    $the_template_part = ‘categories’;

    /* If this is a tag archive */
    } elseif (is_tag()) { printf( __( ‘Tag Archives: <span>%s</span>’, ‘themater’ ), single_tag_title( ”, false ) );
    $the_template_part = ‘tags’;

    /* If this is a daily archive */
    } elseif (is_day()) { printf( __( ‘Daily Archives: <span>%s</span>’, ‘themater’ ), get_the_date() );
    $the_template_part = ‘day’;

    /* If this is a monthly archive */
    } elseif (is_month()) { printf( __( ‘Monthly Archives: <span>%s</span>’, ‘themater’ ), get_the_date(‘F Y’) );
    $the_template_part = ‘month’;

    /* If this is a yearly archive */
    } elseif (is_year()) { printf( __( ‘Yearly Archives: <span>%s</span>’, ‘themater’ ), get_the_date(‘Y’) );
    $the_template_part = ‘year’;

    /* If this is an author archive */
    } elseif (is_author()) { printf( __( ‘Author Archives: <span>%s</span>’, ‘themater’ ), get_the_author() );
    $the_template_part = ‘author’;

    /* If this is a general archive */
    } else { _e( ‘Blog Archives’, ‘themater’ ); $the_template_part = ‘archive’;}
    ?></h2>

    <?php
    get_template_part(‘loop’, $the_template_part);
    ?>
    </div><!– .content –>

    <?php get_template_part(‘content’, ‘after’); ?>

    이건 archive.php 파일 내용인데 어디를 지워줘야

    글제목만 표시되나요?

    Avatar of 082net082net
    Keymaster
    @082net
    #4445

    위 파일내용으로 봐서는 archive.php에서는 무엇을 수정해도 원하시는 결과를 얻을 수 없습니다.

    테마 폴더 내에서 loop.php, loop-categories.php, loop-tags.php … 등등 loop-{$the_template_part}.php 파일들을 수정해야 합니다.

    테스트 삼아 loop.php, loop-categories.php 중 테마폴더에 존재하는 파일을 수정 한 뒤, 카테고리 목록 페이지를 확인해 보세요.

    Avatar of 082net
    Facebook 사용자 모임 그룹 도 함께 운영되고 있으며, 격 주로 미트업과 스터디를 진행하고 있으니 관심 있으신 분들의 많은 참여 바랍니다 🙂
2 글 보임 - 1에서 2 까지 (총 2 중에서)
  • 답변은 로그인 후 가능합니다.