بویکا 124 ارسال شده در آذر 94 گزارش بازنشر ارسال شده در آذر 94 سلام دوستان . من از تابع زیر برای ایجاد لینک پاسخ به نظرات کاربران ( تو در تو ) استفاده کردم .<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>ولی بعد گذاشتن این کد ارور زیر رو میدهWarning: array_merge(): Argument #1 is not an array in C:\xampp\htdocs\xampp\t1\wp-content\themes\shahin\comments.php on line 30فک کنم به آی یا کلاس یکی از عناصر گیر داده . در زیر هم قالب comments.php رو گذاشتم . کمک کنین خلی ممنون میشم<?php // Do not delete these linesif ('comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) die ('Please do not load this page directly. Thanks!');if (!empty($post->post_password)) { // if there's a passwordif ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie?><h2><?php _e('Password Protected'); ?></h2><p><?php _e('Enter the password to view comments.'); ?></p><?php return;}}/* This variable is for alternating comment background */$oddcomment = 'alt';?><!-- You can start editing here. --><?php if ($comments) : ?><div id="comments"><a class="rc" href="#c" role="tab">دیدگاه بنویسید </a><h3 ><?php comments_number('بدون دیدگاه', 'یک دیدگاه', '% دیدگاه' );?></h3></div><ol class="commentlist"><?php foreach ($comments as $comment) : ?><div class="cml"><center><div class="avt"><?php echo get_avatar( $comment, '75' ); ?></div></center> <li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>"><div class="commentmetadata"><strong><?php comment_author_link() ?></strong>, <?php _e('در'); ?> <a href="#comment-<?php comment_ID() ?>" title=""><?php per_number(comment_date('j F, Y')) ?> <?php _e('در');?> <?php per_number(comment_time()) ?></a> <?php _e(''); ?> <?php edit_comment_link('ویرایش دیدگاه','',''); ?> <?php if ($comment->comment_approved == '0') : ?> <em><?php _e('دیدگاه شما در انتظار تایید مدیر می باشد. '); ?></em> <?php endif; ?></div><?php comment_text() ?></li></div><?php /* Changes every other comment to a different class */if ('alt' == $oddcomment) $oddcomment = '';else $oddcomment = 'alt';?><?php endforeach; /* end for each comment */ ?></ol><?php else : // this is displayed if there are no comments so far ?><?php if ('open' == $post->comment_status) : ?><!-- 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 ('open' == $post->comment_status) : ?><div id="c"></div> <h3 id="respond"><span class="fa fa-comment"></span> دیدگاهی بنویسید</h3><?php if ( get_option('comment_registration') && !$user_ID ) : ?><p>شما باید <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">وارد شوید </a> تا بتوانید دیدگاهی بنویسید</p><?php else : ?><form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"><?php if ( $user_ID ) : ?><p id="respond2">وارد شده با نام <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="Log out of this account">خروج »</a></p><?php else : ?><p><label for="author"><small>نام و نام خانوادگی<?php if ($req) echo "(ضروری) "; ?></small></label><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="40" tabindex="1" /></p><p><label for="email"><small>ایمیل شخصی شما <?php if ($req) echo "(ضروری)"; ?></small></label><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="40" tabindex="2" /></p><p><label for="url"><small>آدرس وبسایت شخصی شما </small></label><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="40" tabindex="3" /></p><?php endif; ?><!--<p><small><strong>XHTML:</strong> <?php _e('You can use these tags:'); ?> <?php echo allowed_tags(); ?></small></p>--><p><textarea name="comment" id="comment" cols="60" rows="10" tabindex="4"></textarea></p><p><input name="submit" type="submit" id="submit" tabindex="5" value="ارسال دیدگاه" /><input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></p><?php do_action('comment_form', $post->ID); ?></form><?php endif; // If registration required and not logged in ?><?php endif; // if you delete this the sky will fall on your head ?>با تشکر نقل قول لینک به ارسال
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .