-
2010/03/31 9:08 오후 #3996
제가 쓰는 테마가 공식적인 테마가 아니고, 구글을 통해 다운받았는데 원제작자분이 더이상 업데이트를 하지 않으시는 것 같습니다. 그래서 구 테마라서 그런지 트랙백을 지원하지 않네요. 제가 임의로 트랙백URL은 넣어 두었는데 트랙백을 받았을 때 comment부분에 보통 같이 뜬다고 들었는데 전혀 되지 않네요. 어떻게 수정해야 할까요? (답변이 최근에 거의 달리지 않는데 ㅠㅠ 4월6일에 군대가서, 첫휴가나오면 답변이 달려있겠죠?ㅠㅠ)
블로그 주소는 http://gomgom.net/wordpress입니다
comments.php / function.php / index.php / single.php 파일 첨부합니다.
comments.php
<?php if ( !empty($post->post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?>
<p><?php _e('Enter your password to view comments.'); ?></p>
<?php return; endif; ?><h2 id="comments"><?php comments_number(__('No comments yet'), __('1 Comment'), __('% Comments')); ?>
<?php if ( comments_open() ) : ?>
<a href="#postcomment" title="<?php _e("Leave a comment"); ?>">»</a>
<?php endif; ?>
</h2><?php if ( $comments ) : ?>
<?php foreach ($comments as $comment) : ?>
<div class="comentarios"><?php echo get_avatar( $comment, 32 ); ?>
<a href="<?php comment_author_url(); ?>">
<?php comment_author(); ?></a> wrote @ <?php comment_date() ?> at <?php comment_time() ?></div>
<?php comment_text() ?><?php endforeach; ?>
<?php else : // If there are no comments yet ?>
<?php endif; ?>
<?php if ( comments_open() ) : ?>
<h2 id="postcomment"><?php _e('Your comment'); ?></h2><?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>
<?php else : ?><form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if ( $user_ID ) : ?>
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>">Logout »</a></p>
<?php else : ?>
<p><input type="text" name="author" class="input" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
<label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p><p><input type="text" class="input" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
<label for="email"><small>E-Mail <?php if ($req) echo "(Required, not published )"; ?></small></label></p><p><input type="text" class="input" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
<label for="url"><small>Website</small></label></p><?php endif; ?>
<p><textarea name="comment" class="textarea" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
<?php if (function_exists('lmbbox_smileys_display')) { lmbbox_smileys_display(true); } ?>
<p><input name="submit" class="sub" type="submit" id="submit" tabindex="5" value="Submit" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
</p>
<?php do_action('comment_form', $post->ID); ?></form>
<p> <strong>HTML-Tags:</strong>
<br />
<small><?php echo allowed_tags(); ?></small>
</p><?php endif; // If registration required and not logged in ?>
<?php else : // Comments are closed ?>
<p><?php _e('Sorry, the comment form is closed at this time.'); ?></p>
<?php endif; ?>
function.php
<?php
if ( function_exists('register_sidebars') )
register_sidebars(3);function resize_youtube( $content ) {
return str_replace( "width='425' height='350'></embed>", "width='240' height='197'></embed>", $content );
}
add_filter( 'the_content', 'resize_youtube', 999 );$themecolors = array(
'bg' => 'ffffff',
'text' => '888888',
'link' => '8AB459'
);$content_width = 270;
define('HEADER_TEXTCOLOR', 'ffffff');
define('HEADER_IMAGE', '%s/imagenes_qwilm/beach.jpg'); // %s is theme dir uri
define('HEADER_IMAGE_WIDTH', 900);
define('HEADER_IMAGE_HEIGHT', 200);function header_style() {
?>
<style type="text/css">
#content, #sidebar-1, #sidebar-2, #sidebar-3 {
background-image:url(<?php header_image() ?>);
}
<?php if ( 'blank' == get_header_textcolor() ) { ?>
#hode h4, #hode span {
display: none;
}
<?php } else { ?>
#hode a, #hode {
color: #<?php header_textcolor() ?>;
}
<?php } ?>
</style>
<?php
}function admin_header_style() {
?><style type="text/css">
#headimg {
height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
}#headimg h1 {
font-family: "Lucida Grande",Tahoma,Arial,sans-serif;
font-size: 17px;
font-weight: bold;
margin-left: 15px;
padding-top: 15px;
}
#headimg h1 a {
color:#<?php header_textcolor() ?>;
border: none;
text-decoration: none;
}
#headimg a:hover
{
text-decoration:underline;
}
#headimg #desc
{
font-weight:normal;
color:#<?php header_textcolor() ?>;
margin-left: 15px;
padding: 0;
margin-top: -10px;
font-family: "Lucida Grande",Tahoma,Arial,sans-serif;
font-size: 11px;
}<?php if ( 'blank' == get_header_textcolor() ) { ?>
#headerimg h1, #headerimg #desc {
display: none;
}
#headimg h1 a, #headimg #desc {
color:#<?php echo HEADER_TEXTCOLOR ?>;
}
<?php } ?></style>
<?php }
add_custom_image_header('header_style', 'admin_header_style');
?>
index.php
<?php get_header(); ?>
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Thanks Kubrick for this code ?>
<?php if (is_category()) { ?>
<h2><?php _e('Archive for'); ?> <?php echo single_cat_title(); ?></h2>
<?php } elseif (is_tag()) { ?>
<h2><?php _e('Archive for '); single_tag_title(); ?></h2>
<?php } elseif (is_day()) { ?>
<h2><?php _e('Archive for'); ?> <?php the_time('F j, Y'); ?></h2>
<?php } elseif (is_month()) { ?>
<h2><?php _e('Archive for'); ?> <?php the_time('F, Y'); ?></h2><?php } elseif (is_year()) { ?>
<h2><?php _e('Archive for'); ?> <?php the_time('Y'); ?></h2><?php } elseif (is_author()) { ?>
<h2><?php _e('Author Archive'); ?></h2><?php } elseif (is_search()) { ?>
<h2><?php _e('Search Results'); ?></h2><?php } ?>
<?php while (have_posts()) : the_post(); ?><div class="post">
<h2 class="post-titulo" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent link to'); ?> <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<p class="postmeta"><?php the_time(get_option('date_format')) ?> <?php _e('at'); ?> <?php the_time() ?> · <?php _e('Filed under'); ?> <?php the_category(', ') ?> <?php the_tags( ' and ' . __( 'tagged' ) . ': ', ', ', ''); ?> <?php edit_post_link(__('Edit'), ' · ', ''); ?><p>Trackback URL for this post: <?php trackback_url(); ?>
</p></p>
<?php if (is_search()) { ?>
<?php the_excerpt() ?>
<?php } else { ?>
<?php the_content(__('Read the rest of this entry »')); ?>
<?php } ?><p class="comentarios-link"><?php comments_popup_link(__('Comments'), __('Comments (1)'), __('Comments (%)'), 'commentslink', __('Comments off')); ?>
</p>
</div>
<?php endwhile; ?><?php posts_nav_link( ' · ', __('« Previous entries'), __('Next entries »'), '' );?>
<?php else : ?><h2><?php _e('Not Found'); ?></h2>
<p><?php _e('Sorry, but no posts matched your criteria.'); ?></p>
<h3><?php _e('Search'); ?></h3>
<?php include (TEMPLATEPATH . '/searchform.php'); ?><?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
single.php
<?php get_header(); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="pagina">
<h2 class="post-titulo" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent link to'); ?> <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<p class="postmeta">
<?php the_time(get_option('date_format')) ?> <?php _e('at'); ?> <?php the_time() ?>
· <?php _e('Filed under'); ?> <?php the_category(', ') ?>
<?php the_tags( ' and ' . __( 'tagged' ) . ': ', ', ', ''); ?>
<?php edit_post_link(__('Edit'), ' · ', ''); ?>
<p>Trackback URL for this post: <?php trackback_url(); ?>
</p>
</p>
<div class="postentry">
<?php the_content(__('Read the rest of this entry »')); ?>
<?php wp_link_pages(); ?>
</div><p class="linkpermanente">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent link to'); ?> <?php the_title(); ?>" class="permalink"><?php _e('Permalink'); ?></a>
</p>
</div>
<?php comments_template(); ?>
<?php endwhile; else : ?><h2><?php _e('Not Found'); ?></h2>
<p><?php _e('Sorry, but the page you requested cannot be found.'); ?></p>
<h3><?php _e('Search'); ?></h3>
<?php include (TEMPLATEPATH . '/searchform.php'); ?><?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
2010/03/31 9:08 오후 #3997제가 쓰는 테마가 공식적인 테마가 아니고, 구글을 통해 다운받았는데 원제작자분이 더이상 업데이트를 하지 않으시는 것 같습니다. 그래서 구 테마라서 그런지 트랙백을 지원하지 않네요. 제가 임의로 트랙백URL은 넣어 두었는데 트랙백을 받았을 때 comment부분에 보통 같이 뜬다고 들었는데 전혀 되지 않네요. 어떻게 수정해야 할까요? (답변이 최근에 거의 달리지 않는데 ㅠㅠ 4월6일에 군대가서, 첫휴가나오면 답변이 달려있겠죠?ㅠㅠ)
블로그 주소는 http://gomgom.net/wordpress입니다
comments.php / function.php / index.php / single.php 파일 첨부합니다.
comments.php
<?php if ( !empty($post->post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?>
<p><?php _e('Enter your password to view comments.'); ?></p>
<?php return; endif; ?><h2 id="comments"><?php comments_number(__('No comments yet'), __('1 Comment'), __('% Comments')); ?>
<?php if ( comments_open() ) : ?>
<a href="#postcomment" title="<?php _e("Leave a comment"); ?>">»</a>
<?php endif; ?>
</h2><?php if ( $comments ) : ?>
<?php foreach ($comments as $comment) : ?>
<div class="comentarios"><?php echo get_avatar( $comment, 32 ); ?>
<a href="<?php comment_author_url(); ?>">
<?php comment_author(); ?></a> wrote @ <?php comment_date() ?> at <?php comment_time() ?></div>
<?php comment_text() ?><?php endforeach; ?>
<?php else : // If there are no comments yet ?>
<?php endif; ?>
<?php if ( comments_open() ) : ?>
<h2 id="postcomment"><?php _e('Your comment'); ?></h2><?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>
<?php else : ?><form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if ( $user_ID ) : ?>
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>">Logout »</a></p>
<?php else : ?>
<p><input type="text" name="author" class="input" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
<label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p><p><input type="text" class="input" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
<label for="email"><small>E-Mail <?php if ($req) echo "(Required, not published )"; ?></small></label></p><p><input type="text" class="input" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
<label for="url"><small>Website</small></label></p><?php endif; ?>
<p><textarea name="comment" class="textarea" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
<?php if (function_exists('lmbbox_smileys_display')) { lmbbox_smileys_display(true); } ?>
<p><input name="submit" class="sub" type="submit" id="submit" tabindex="5" value="Submit" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
</p>
<?php do_action('comment_form', $post->ID); ?></form>
<p> <strong>HTML-Tags:</strong>
<br />
<small><?php echo allowed_tags(); ?></small>
</p><?php endif; // If registration required and not logged in ?>
<?php else : // Comments are closed ?>
<p><?php _e('Sorry, the comment form is closed at this time.'); ?></p>
<?php endif; ?>
function.php
<?php
if ( function_exists('register_sidebars') )
register_sidebars(3);function resize_youtube( $content ) {
return str_replace( "width='425' height='350'></embed>", "width='240' height='197'></embed>", $content );
}
add_filter( 'the_content', 'resize_youtube', 999 );$themecolors = array(
'bg' => 'ffffff',
'text' => '888888',
'link' => '8AB459'
);$content_width = 270;
define('HEADER_TEXTCOLOR', 'ffffff');
define('HEADER_IMAGE', '%s/imagenes_qwilm/beach.jpg'); // %s is theme dir uri
define('HEADER_IMAGE_WIDTH', 900);
define('HEADER_IMAGE_HEIGHT', 200);function header_style() {
?>
<style type="text/css">
#content, #sidebar-1, #sidebar-2, #sidebar-3 {
background-image:url(<?php header_image() ?>);
}
<?php if ( 'blank' == get_header_textcolor() ) { ?>
#hode h4, #hode span {
display: none;
}
<?php } else { ?>
#hode a, #hode {
color: #<?php header_textcolor() ?>;
}
<?php } ?>
</style>
<?php
}function admin_header_style() {
?><style type="text/css">
#headimg {
height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
}#headimg h1 {
font-family: "Lucida Grande",Tahoma,Arial,sans-serif;
font-size: 17px;
font-weight: bold;
margin-left: 15px;
padding-top: 15px;
}
#headimg h1 a {
color:#<?php header_textcolor() ?>;
border: none;
text-decoration: none;
}
#headimg a:hover
{
text-decoration:underline;
}
#headimg #desc
{
font-weight:normal;
color:#<?php header_textcolor() ?>;
margin-left: 15px;
padding: 0;
margin-top: -10px;
font-family: "Lucida Grande",Tahoma,Arial,sans-serif;
font-size: 11px;
}<?php if ( 'blank' == get_header_textcolor() ) { ?>
#headerimg h1, #headerimg #desc {
display: none;
}
#headimg h1 a, #headimg #desc {
color:#<?php echo HEADER_TEXTCOLOR ?>;
}
<?php } ?></style>
<?php }
add_custom_image_header('header_style', 'admin_header_style');
?>
index.php
<?php get_header(); ?>
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Thanks Kubrick for this code ?>
<?php if (is_category()) { ?>
<h2><?php _e('Archive for'); ?> <?php echo single_cat_title(); ?></h2>
<?php } elseif (is_tag()) { ?>
<h2><?php _e('Archive for '); single_tag_title(); ?></h2>
<?php } elseif (is_day()) { ?>
<h2><?php _e('Archive for'); ?> <?php the_time('F j, Y'); ?></h2>
<?php } elseif (is_month()) { ?>
<h2><?php _e('Archive for'); ?> <?php the_time('F, Y'); ?></h2><?php } elseif (is_year()) { ?>
<h2><?php _e('Archive for'); ?> <?php the_time('Y'); ?></h2><?php } elseif (is_author()) { ?>
<h2><?php _e('Author Archive'); ?></h2><?php } elseif (is_search()) { ?>
<h2><?php _e('Search Results'); ?></h2><?php } ?>
<?php while (have_posts()) : the_post(); ?><div class="post">
<h2 class="post-titulo" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent link to'); ?> <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<p class="postmeta"><?php the_time(get_option('date_format')) ?> <?php _e('at'); ?> <?php the_time() ?> · <?php _e('Filed under'); ?> <?php the_category(', ') ?> <?php the_tags( ' and ' . __( 'tagged' ) . ': ', ', ', ''); ?> <?php edit_post_link(__('Edit'), ' · ', ''); ?><p>Trackback URL for this post: <?php trackback_url(); ?>
</p></p>
<?php if (is_search()) { ?>
<?php the_excerpt() ?>
<?php } else { ?>
<?php the_content(__('Read the rest of this entry »')); ?>
<?php } ?><p class="comentarios-link"><?php comments_popup_link(__('Comments'), __('Comments (1)'), __('Comments (%)'), 'commentslink', __('Comments off')); ?>
</p>
</div>
<?php endwhile; ?><?php posts_nav_link( ' · ', __('« Previous entries'), __('Next entries »'), '' );?>
<?php else : ?><h2><?php _e('Not Found'); ?></h2>
<p><?php _e('Sorry, but no posts matched your criteria.'); ?></p>
<h3><?php _e('Search'); ?></h3>
<?php include (TEMPLATEPATH . '/searchform.php'); ?><?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
single.php
<?php get_header(); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="pagina">
<h2 class="post-titulo" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent link to'); ?> <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<p class="postmeta">
<?php the_time(get_option('date_format')) ?> <?php _e('at'); ?> <?php the_time() ?>
· <?php _e('Filed under'); ?> <?php the_category(', ') ?>
<?php the_tags( ' and ' . __( 'tagged' ) . ': ', ', ', ''); ?>
<?php edit_post_link(__('Edit'), ' · ', ''); ?>
<p>Trackback URL for this post: <?php trackback_url(); ?>
</p>
</p>
<div class="postentry">
<?php the_content(__('Read the rest of this entry »')); ?>
<?php wp_link_pages(); ?>
</div><p class="linkpermanente">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent link to'); ?> <?php the_title(); ?>" class="permalink"><?php _e('Permalink'); ?></a>
</p>
</div>
<?php comments_template(); ?>
<?php endwhile; else : ?><h2><?php _e('Not Found'); ?></h2>
<p><?php _e('Sorry, but the page you requested cannot be found.'); ?></p>
<h3><?php _e('Search'); ?></h3>
<?php include (TEMPLATEPATH . '/searchform.php'); ?><?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
-
AuthorPosts
- 답변은 로그인 후 가능합니다.