رفتن به مطلب

پست های پیشنهاد شده

قبل از

</head>

قرار دادم ولی جواب نداد

به این صورت گذاشتم:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>zoobino.com | پرتال خبری سرگرمی تفریحی</title>
<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php bloginfo( 'stylesheet_directory' ); ?>/js/zoobino.js"></script>
if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
</head>

لینک به ارسال

این کد php هست

داخل <?php /.... ?> باید باشه

تابع wp_head , wp_footer رو هم اضافه کنید . طبق راهنمایی مرتضی

لینک به ارسال

کد رو قبل تگ هد و در داخل تابع <?php wp_head();?> به اینصورت قرار دادم ولی تغییری نکرد:


<?php if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' ); wp_head ();?>
</head>

ویرایش شده توسط fantome0
لینک به ارسال


<?php if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' ); wp_head ();?>

</head>

و در footer.php


<?php wp_footer();?>

لینک به ارسال

ایمان جان من دقیقا همینی که دادی قرار دادم هم تو هدر و هم تو فوتر . ولی تغییری نکرد.

من میخوام وقتی رو پاسخ کلیک میکنم فرم پاسخ بیاد زیرش و دیگه نره پایین صفحه. اما متاسفانه این کد عمل نمیکنه!

فایل هدر:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>zoobino.com | پرتال خبری سرگرمی تفریحی</title>
<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php bloginfo( 'stylesheet_directory' ); ?>/js/zoobino.js"></script>
<?php if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' ); wp_head ();?>
</head>

فایل فوتر:


<div id="footer">
<?php wp_footer();?>
<div id="footer-wrapper">
<?php wp_nav_menu(array('menu'=>'menu-footer','menu_id'=>'footer-menu'));?>
<p>2012 © کلیه حقوق مادی و معنوی این سایت متعلق به <a href="<?php bloginfo('url');?>" title="<?php bloginfo('name');?>">زوبینو (موج هزاره مهرگان)</a> می باشد.</p>
<p>هر گونه کپی و یا برداشت از اطلاعات این سایت با ذکر منبع بلا مانع می باشد.</p>
</div>
</div>
</body>
</html>

لینک به ارسال

شما لینک reply را در قالبتون هم گذاشتید یعنی در برگه comments.php براش قالب ساختید؟

اگر نه که باید قالب مناسب را هم بسازید

ساخت قالب نظرات را در سایت جستجو کنید مطلب مفید زیاد داریم

لینک به ارسال

من برای نظرات قالب ساختم ولی برای reply رو فکر نمیکنم. من از این آموزش این قالب رو ساختم.

این کد فایل comments.php هستش:


<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/

// Do not delete these lines
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');

if ( post_password_required() ) { ?>
<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
<?php
return;
}
?>

<!-- You can start editing here. -->

<?php if ( have_comments() ) : ?>
<div class="comments">
<a class="comm_title_box" href="#">نظرات بینندگان</a>
</div>

<ol class="commentlist">
<div class="comments_item">
<?php wp_list_comments('type=comment&callback=advanced_comment'); //this is the important part that ensures we call our custom comment layout defined above
?>
</ol>
<div class="clear"></div>
<div class="comment-navigation">
<div class="older"><?php previous_comments_link() ?></div>
<div class="newer"><?php next_comments_link() ?></div>
</div>
<?php else : // this is displayed if there are no comments so far ?>

<?php if ( comments_open() ) : ?>
<!-- If comments are open, but there are no comments. -->

<?php else : // comments are closed ?>
<!-- If comments are closed. -->
<p class="nocomments">Comments are closed.</p>

<?php endif; ?>
<?php endif; ?>


<?php if ( comments_open() ) : ?>

<div class="comments">
<a class="comm_title_box2" href="#">نظر شما</a>
</div>

<div class="cancel-comment-reply">
<small><?php cancel_comment_reply_link(); ?></small>
</div>

<?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
<p>You must be <a href="<?php echo wp_login_url( get_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="respond" name="respond">

<?php if ( is_user_logged_in() ) : ?>

<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out »</a></p>

<?php else : //this is where we setup the comment input forums ?>

<p align="right"><label for="author">نام:    </label></p>
<p><input size="38" style="text-align:right; font-family:tahoma; font-size:8pt;" type="text" name="author" id="author" value="<?php echo $comment_author; ?>" tabindex="1" /></p>
<p align="right"><label for="email">ايميل:</label></p>
<p><input size="38" style="text-align:left;direction: ltr; font-family:tahoma; font-size:8pt;" type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" tabindex="2" /></p>

<?php endif; ?>

<!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->
<p align="right"><label for="comment">* نظر:</label></p>
<p><textarea size="50" style="text-align:right; font-family:tahoma; font-size:8pt;" name="comment" id="comment" cols="45" rows="6" tabindex="4"></textarea></p>

<p align="right"><input style="font-family:tahoma; font-size:9pt; margin:5px 0px;" type="submit" name="submit" value="ارسال" class="button" tabindex="5" />
<?php comment_id_fields(); ?>
</p>
<p align="right"><?php do_action('comment_form', $post->ID); ?></p>

</form>

<?php endif; // If registration required and not logged in ?>
</div>

<?php endif; // if you delete this the sky will fall on your head ?>

لینک به ارسال

این هم کدیه که تو فانکشن قرار دادم

فکر کنم مشکل از اینجاست:


<?php //this function will be called in the next section
function advanced_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment; ?>
<title></title>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
<div class="comm_info_bar">
<div class="comm_info_content">
<div class="comm_info_name"<a href="<?php the_author_meta( 'user_url'); ?>"><?php printf(__('%s'), get_comment_author_link()) ?></a></div>
<span class="comm_sep">|</span>
<div class="comm_info_country"><?php
if (function_exists("CID_init")) {
CID_print_comment_flag(); echo ' ';CID_print_comment_browser();
}
?></div>
<span class="comm_sep"> |</span>
<div class="comm_info_date"><?php printf(__('%2$s - %1$s'), get_comment_date(), get_comment_time()) ?><?php edit_comment_link(__('(Edit)'),' ','') ?></div>
</div>
<div class="comm_rating">
<div class="rat_bott">
<?php if(function_exists(ckrating_display_karma)) { ckrating_display_karma(); } ?></div></div>
<div class="comm_answer_link" style="cursor:pointer">
<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
</div>
</div>
<div class="clear"></div>

<?php if ($comment->comment_approved == '0') : ?>
<em><?php _e('Your comment is awaiting moderation.') ?></em>
<br />
<?php endif; ?>

<div class="comment-text">
<?php comment_text() ?>
</div>
<div class="clear"></div>
<?php } ?>

لینک به ارسال

کدها درستند ایراد از جای دیگه است شاید با کدت جاواغ اسکریپت قالبتون مشکل داره به هر حال کدهای اصلیتون درسته دنبال ایراد درذ جاهای دیگه سایت بگردید

لینک به ارسال

گفته بودین برای بخش Reply باید قالب درست کنم. من آموزش ساخت قالب برای بخش نظرات رو چندجا خوندم ولی هیچ کدوم در مورد این بخش توضیحی ارائه نکردن؟ این کار چطور میسر هست.

الان تو کدهای من برای این بخش قالب درست شده؟

سپاس

لینک به ارسال

شما اگر از یکی از کدهای استاندارد مخصوصا کد خود پوسته پیش فرض وردپرس استفاده کنید این موضوع درش رعایت شده

لینک به ارسال

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...