2014-03-03 7 views
2

안녕하세요 여러분, 저는 자동차 리뷰를 만들고 있습니다. 나는 위대한 프로그래머가 아니므로 php 코드에 문제가 있습니다. 사실이 페이지 Memes 나는 소셜 플러그인을 각 그림 아래에 놓고 싶습니다. 그리고 맨 위에는 게시 날짜와 게시물 작성자를 표시하고 싶습니다. 사진 크기 등을위한 일부 형식은 너무 좋습니다. 아래는 내가 마지막 검토 부분에 대해 내가 좋아하는 Autotest/review을 뭔가를하고 싶은 워드 프레스 용 PHP 코드

<?php /* 
Template Name: ListPostsInCategoryThatHasSameNameAsPage 
*/ ?> 

<?php get_header(); ?> 

<div id="content" class="archive <?php if(get_option('colabs_layout_settings')=='two-col-right'){echo 'right';}else{?>left<?php }?>"> 

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?> 

    <div <?php post_class(); ?> id="post_<?php the_ID(); ?>"> 

    <span id="map"><a href="<?php echo get_option('home'); ?>/"><?php _e('Home','colabsthemes');?></a> &raquo; <?php the_title(); ?></span> 

    <h2 class="title"><?php the_title(); ?></h2> 


     <div class="entry" style="padding-top:15px;"> 
     <?php the_content(__('<p>Read the rest of this page &raquo;</p>','colabsthemes')); ?> 
     <?php echo colabs_share();?> 

     <?php wp_link_pages(array('before' => __('<p><strong>Pages:</strong>','colabsthemes'), 'after' => '</p>', 'next_or_number' => 'number')); ?> 

     </div> 
    </div> 

    <?php endwhile; else: endif; ?> 


    <?php query_posts('category_name='.get_the_title().'&post_status=publish,future');?> 
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?> 
    <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> 
    <p><?php the_content(); ?> 
    <?php endwhile; else: endif; ?> 


</div> 
</div> 

<div id="sidebar" class="<?php if(get_option('colabs_layout_settings')=='two-col-right'){echo 'left';}else{?>right<?php }?>"> 
     <?php get_sidebar(); ?> 
</div> 

<div> <?php get_footer(); ?> </div> 

을 사용하고있는 코드입니다하지만 난 평방 기사의이 종류를 표시하는 데 사용되는 코드 모른다. 제발 도와주세요.

답변

0

저자 및 게시물의 날짜를 추가하려면, 당신은 추가 할 수 있습니다

<p>Written by: 
<?php get_the_author(); ?></p> 

get_the_author()를 사용자 프로필에 필드 "로 공개적으로 표시 이름"자신에 설정되어 저자의 이름을 표시합니다 (관리> 사용자> 내 프로필). - 당신이 그들을 제거 않았다

<p>Written by: 
<?php get_the_author(); ?> on 
<?php get_the_date(); ?></p> 

당신은 당신이에 링크 된 페이지의 사회적 공유 링크를 사용하고 어디는 표시되지 않습니다 :

또한 날짜를 표시하려면?

http://codex.wordpress.org/Function_Reference/get_the_author http://codex.wordpress.org/Function_Reference/get_the_date

: 자세한 내용은