رفتن به مطلب

keyvan

عضو سایت
  • تعداد ارسال‌ها

    551
  • تاریخ عضویت

  • آخرین بازدید

نوشته‌ها ارسال شده توسط keyvan

  1. سلام

    تا الان فقط یک مطلب رو در مطالبم دیدم که اینطوری بشه، این وضعیت بعد از تغییر قالب پیش اومده، امکان ارسال نظر برای این مطلب بسته شده!

    نمایش مطلب

    دلیلش چیه؟

    مورد دیگه دربخش پاسخ های تودرتو هست،وقتی یک کامنت ارسال میشه ، امکان پاسخ به اون محدودیت نداره، اما پاسخی که به اون کامنت داده شده امکان پاسخ دادن براش فراهم نیست، یعنی فرض بگیرید که یک کاربر نظر داده، این نظر میشه در تعداد بالا پاسخ داد، اماوقتی من یا هر کاربر دیگه ای بهش پاسخ میدم، دیگه نمی تونه به نظری برای پاسخ من ارسال کنه

    مثلا" این مطلب رو مشاهده کنید. لینک

    این کدهای فایل کامنت هست


    <div id="comments">
    <?php if ( have_comments() ) :
    echo '<div class="comment-text"><ol class="commentlist">';
    wp_list_comments( array( 'callback' => 'elm_comment_loop' ) );
    echo '</ol></div>';
    ?>
    <?php
    elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) :
    ?>
    <p class="nocomments">مجوز ارسال دیدگاه داده نشده است!</p>
    <?php
    endif; ?>
    <?php elm_comment_form(); ?>
    </div>

    این کدها رو هم اگر درست اینجا گذاشته باشم در فایل functions.php هست


    function remove_comment_classes( $classes ) {
    // Classes is an array of class names, so for each item - $array_key => $class_name
    foreach( $classes as $key => $class ) {
    // Check the class name
    switch( $class ) {
    // If the the class name is comment, move along
    case 'comment':
    unset( $classes[$key] );
    break;
    // If it's anything else, unset the item from the array (remove)
    default:
    continue;
    break;
    }
    }
    // Clean out the variables no longer needed
    unset($key,$class);
    $classes[] = 'text';
    // Return the result
    return $classes;
    }

    function elm_comment_loop( $comment, $args, $depth ) {
    $GLOBALS['comment'] = $comment;
    switch ( $comment->comment_type ) :
    case 'pingback' :
    case 'trackback' :
    ?>
    <li class="post pingback">
    <p>بازتاب: <?php comment_author_link(); ?><?php edit_comment_link('ویرایش', '<span class="edit-link">', '</span>'); ?></p>
    <?php
    break;
    default :
    ?>
    <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
    <article id="comment-<?php comment_ID(); ?>">
    <footer class="comment-meta">
    <div class="comment-author vcard">
    <?php
    $avatar_size = 45;
    if ('0' != $comment -> comment_parent)
    $avatar_size = 39;
    echo get_avatar($comment, $avatar_size);
    /* translators: 1: comment author, 2: date and time */
    printf('%1$s در %2$s ', sprintf('<span class="fn">%s</span>', get_comment_author_link()), sprintf('<a href="%1$s"><time datetime="%2$s">%3$s</time></a>', esc_url(get_comment_link($comment -> comment_ID)), get_comment_time('c'),
    /* translators: 1: date, 2: time */
    sprintf('%1$s ، %2$s', get_comment_date("d M Y"), get_comment_time())));
    ?>
    <?php edit_comment_link('(ویرایش)', '<span class="edit-link">', '</span>'); ?>
    </div><!-- .comment-author .vcard -->
    <?php if ( $comment->comment_approved == '0' ) : ?>
    <em class="comment-awaiting-moderation">نظر شما بعد از تایید نمایش داده می شود.</em>
    <br />
    <?php endif; ?>
    </footer>
    <div class="comment-content"><?php comment_text(); ?></div>
    <?php if ('0' == $comment -> comment_parent): ?>
    <div class="reply">
    <?php comment_reply_link(array_merge($args, array('reply_text' => 'پاسخ <span>↓</span>', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?>
    </div><!-- .reply -->
    <?php endif ?>
    </article><!-- #comment-## -->
    <div class="clear"></div>
    <?php
    break;
    endswitch;
    }
    function elm_comment_form( $args = array(), $post_id = null ) {
    global $id;
    if ( null === $post_id )
    $post_id = $id;
    else
    $id = $post_id;
    $commenter = wp_get_current_commenter();
    $user = wp_get_current_user();
    $user_identity = ! empty( $user->ID ) ? $user->display_name : '';
    $req = get_option( 'require_name_email' );
    $aria_req = ( $req ? " aria-required='true'" : '' );
    $fields = array(
    'author' => '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" placeholder="نام و نام خانوادگی" size="30"' . $aria_req . ' />',

    'comment' => '<textarea id="comment" name="comment" cols="45" rows="8" placeholder="توضیحات" aria-required="true"></textarea>' ,

    'email' => '<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" placeholder="آدرس ایمیل" size="30"' . $aria_req . ' />',

    'url' => '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" placeholder="آدرس وب سایت" size="30" />',
    );
    $required_text = sprintf( ' ' . __('Required fields are marked %s'), '<span class="required">*</span>' );
    $defaults = array(
    'fields' => apply_filters( 'comment_form_default_fields', $fields ),
    'comment_field' => '<textarea id="comment" name="comment" cols="45" rows="8" placeholder="توضیحات" aria-required="true"></textarea>' ,
    'must_log_in' => '<p class="must-log-in">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
    'logged_in_as' => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
    'comment_notes_before' => '',
    'comment_notes_after' => '',
    'id_form' => 'commentform',
    'id_submit' => '',
    'title_reply' => 'ارسال نظر <br><small class="small_desc">لطفا نظر را در ارتباط با اين مطلب ارسال نماييد.سوالات خود را در <a href="http://www.elmevarzesh.com/forum" target=_blank> انجمن مشاوره سايت</a> مطرح کنيد</small>',
    'title_reply_to' => __( 'Leave a Reply to %s' ),
    'cancel_reply_link' => __( 'Cancel reply' ),
    'label_submit' => ' ',
    );
    //'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email address will not be published.' ) . ( $req ? $required_text : '' ) . '</p>',
    $args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) );
    ?>
    <?php if ( comments_open() ) : ?>
    <?php do_action('comment_form_before'); ?>
    <div id="respond" class="idea">
    <span id="reply-title" class="font-face"><?php comment_form_title($args['title_reply'], $args['title_reply_to']); ?> <small><?php cancel_comment_reply_link($args['cancel_reply_link']); ?></small></span>
    <?php if ( get_option( 'comment_registration' ) && !is_user_logged_in() ) : ?>
    <?php echo $args['must_log_in']; ?>
    <?php do_action('comment_form_must_log_in_after'); ?>
    <?php else : ?>
    <form action="<?php echo site_url('/wp-comments-post.php'); ?>" method="post" id="<?php echo esc_attr($args['id_form']); ?>">
    <?php do_action('comment_form_top'); ?>
    <?php if ( is_user_logged_in() ) : ?>
    <?php echo apply_filters('comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity); ?>
    <?php do_action('comment_form_logged_in_after', $commenter, $user_identity); ?>
    <?php else : ?>
    <?php echo $args['comment_notes_before']; ?>
    <?php
    do_action('comment_form_before_fields');
    foreach ((array) $args['fields'] as $name => $field) {
    echo apply_filters("comment_form_field_{$name}", $field) . "\n";
    }
    do_action('comment_form_after_fields');
    ?>
    <?php endif; ?>
    <?php if ( is_user_logged_in() ) echo apply_filters('comment_form_field_comment', $args['comment_field']); ?>
    <?php echo $args['comment_notes_after']; ?>
    <p class="form-submit">
    <input name="submit" type="submit" id="<?php echo esc_attr($args['id_submit']); ?>" value="<?php echo esc_attr($args['label_submit']); ?>" />
    <?php comment_id_fields($post_id); ?>
    </p>
    <?php do_action('comment_form', $post_id); ?>
    </form>

    <?php endif; ?>
    </div><!-- #respond -->

    <?php do_action('comment_form_after'); ?>
    <?php else : ?>
    <?php do_action('comment_form_comments_closed'); ?>
    <?php endif; ?>
    <?php

  2. خوشبختانه این مشکل حل شده و فعلا" خبری از نات فاند نیست، به این روش عمل کردم، می نویسم تا شاید به کار کسی بیاد

    افزونه 404-redirection رو نصب کردم ، پیوند یکتا رو مجددا" ذخیره کردم و در گوگل وبمستر لینک هایی که ارور 404 رو داشت فیکس کردم، بعد از چند روز ارورها رفع شد

  3. سلام

    با وجود اینکه کدهای مربوط به آرشیو در پوسته هست اما با وارد کردن آدرس آرشیو صفحه 404 نمایش داده میشه،

    جستجوی مطالب روی این کدها قرار گرفته و مشکلی نداره اما آرشیو رو نمایش نمیده


    <?php get_header();?>
    <div class="content" id="page-wrap">
    <!-- Content Right -->
    <div class="content-right category" id="categoryTwo">
    <ul>
    <?php
    //$query = new WP_Query( array('showposts' => 3 , 'cat' => $category->term_id) );
    if ( have_posts() ) {
    $c = 0;
    while ( have_posts() ) {
    $c++;
    the_post();
    echo '<li>';

    echo '<div class="text-category" >';

    if ( has_post_thumbnail() ) { the_post_thumbnail( 'post_thumb_one' ); }
    echo '<a href="'.get_permalink($post->ID).'" class="font-face2">'. get_the_title() .'</a>';
    echo '<p>';
    the_excerpt();
    echo '</p>';

    echo '<div class="detailbox">
    <a href="'.get_permalink($post->ID).'" class="font-face">ادامه مطلب</a>
    <span class="author">نوشته‌ی: <span>';
    echo get_the_author();

    echo '</span> - ';
    the_time('d M y');
    echo '</span>
    </div>';

    echo '</div></li>';
    }
    }else{
    echo 'درخواست شما نتیجه ای ندارد';
    }
    ?>

    </ul>
    <?php require_once("page_navi.php"); ?>
    </div>
    <!-- End Content Right -->
    <?php get_sidebar("category"); ?>
    <div class="clear"></div>
    </div>
    </div>
    <!-- End Wrapper -->
    <?php get_footer() ?>

  4. همانطور که گفتم الان نوشته های پست سفارشی به خوبی نمایش داده میشه، فقط مشکل که هست، اینه که چطور مانند صفحه دسته ها که عنوان دسته روی اون قرار گرفته، برای آرشیو پست سفارشی هم همینطور باشه؟ از دسته بندی براش استفاده کردم اما جواب نداد

  5. طبق توصیه شما در این پست و همچنین بر اساس های کدهای پست قبلی ام یک آرشیو با این عنوان ساختم archives-learn.php اما وقتی این آدرس رو وارد می کنم؛ وارد صفحه مربوطه نمیشه، من فقط یک آرشیو از پست های سفارشی می خوام، آیا لازم هست در کدهای آرشیو تغییراتی اعمال بشه؟

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