رفتن به مطلب

dr-wp

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

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

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

نوشته‌ها ارسال شده توسط dr-wp

  1. سلام

    من کدهای زیر رو توی فایل فانکشین قرار دادم برای بخش کامنت ها ولی مشکلی که داره اینه که وقتی هر مطلبی رو قرار میدم یه نظر ثبت میشه که نام نویسنده عنوان محصول هست و لینک سایت هم آدرس اون پست

    قضیه چیه؟


    function bistscript_comment( $comment, $args, $depth ) {
    $GLOBALS['comment'] = $comment;
    switch ( $comment->comment_type ) :
    case 'pingback' :
    case 'trackback' :
    // Display trackbacks differently than normal comments.
    ?>


    <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>">
    <p><?php _e( 'Pingback:', 'bistscript' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'bistscript' ), '<span class="edit-link">', '</span>' ); ?></p>
    <?php
    break;
    default :
    // Proceed with normal comments.
    global $post;


    //Check Whether the comment is a Respond or Not
    global $wpdb;

    $get_comment_ID = get_comment_ID();
    $respond_query = "SELECT * FROM $wpdb->comments
    WHERE comment_ID = {$get_comment_ID}";

    $rsp = $wpdb->get_results($respond_query);




    ?>


    <div class="comment row<?php foreach ($rsp as $rs) {

    if($rs->comment_parent == 0) : echo ""; else : echo " replied"; endif;


    } ?>" id="li-comment-<?php comment_ID(); ?>">


    <div class="avatar-reply col">
    <?php echo get_avatar( $comment, 100 ); ?>
    <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'پاسخ دهید', 'bistscript' ), 'after' => '', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    </div>
    <div class="comment-body">
    <div class="comment-body-top row">
    <a class="author" href="<?php comment_author_url(); ?>" rel="nofollow" title="مشاهده وب سایت <?php comment_author(); ?>"><?php comment_author(); ?></a>
    <span class="date"><?php comment_date(__('F jS, Y','kubrick')) ?> </span>
    </div>
    <p id="comment-<?php comment_ID(); ?>" class="comment-texttt">

    <?php if ( '0' == $comment->comment_approved ) : ?>
    <p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'bistscript' ); ?></p>
    <?php endif; ?>
    <section class="comment-content">
    <?php comment_text(); ?>
    <?php edit_comment_link( __( 'Edit', 'bistscript' ), '<p class="edit-link">', '</p>' ); ?>
    </section><!-- .comment-content -->



    </p><!-- #comment-## -->
    </div>


    </div>

    <?php
    break;
    endswitch; // end comment_type check
    }

    function bistscript_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 = $user->exists() ? $user->display_name : '';
    $req = get_option( 'require_name_email' );
    $aria_req = ( $req ? " aria-required='true'" : '' );
    $fields = array(
    'author' => '<input class="send-form-input" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '"' . $aria_req . ' placeholder="نام و نام خانوادگی : ">',
    'email' => '<input class="send-form-input" id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '"' . $aria_req . ' placeholder="ایمیل : ">',
    'url' => '<input class="send-form-input" id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" placeholder="وب سایت : ">',
    );
    $defaults = array(
    'fields' => apply_filters( 'comment_form_default_fields', $fields ),
    'comment_field' => '<textarea class="comment-texttt" id="comment" name="comment" aria-required="true" placeholder="متن : "></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>' ), get_edit_user_link(), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
    'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email address will not be published.' ) . ( $req ? $required_text : '' ) . '</p>',

    'id_form' => 'commentform',
    'id_submit' => 'submit',
    'title_reply' => __( 'Leave a Reply' ),
    'title_reply_to' => __( 'Leave a Reply to %s' ),
    'cancel_reply_link' => __( 'Cancel reply' ),
    'label_submit' => __( 'Post Comment' ),
    );
    $args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) );
    if ( comments_open( $post_id ) ) :
    do_action( 'comment_form_before' ); ?>
    <div id="respond">
    <small><?php cancel_comment_reply_link( $args['cancel_reply_link'] ); ?></small>
    <div style="position:relative;">
    <?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() ) : ?>
    <script>
    $("#respond").addClass("comment-as-logged-in-user");
    </script>
    <?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
    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 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="ارسال دیدگاه" class="send_comment_form_submit">
    <?php comment_id_fields( $post_id ); ?>
    </p>
    <?php do_action( 'comment_form', $post_id ); ?>
    </form>
    <?php endif; ?>
    </div>
    </div><!-- #respond -->
    <!-- www.20script.ir -->
    <?php else : do_action( 'comment_form_comments_closed' ); endif; }?>

  2. سلام

    مشکل رو فهمیدم

    من وقتی فونت آیکون استفاده بعد وقتی وردپرس کردم این کلاس بهش اضافه شده :

    .fa {

    display: inline-block;

    font-family: FontAwesome;

    font-feature-settings: normal;

    font-kerning: auto;

    font-language-override: normal;

    font-size: inherit;

    font-size-adjust: none;

    font-stretch: normal;

    font-style: normal;

    font-synthesis: weight style;

    font-variant: normal;

    font-weight: normal;

    line-height: 1;

    text-rendering: auto;

    }

    حالا وقتی font-size رو مقدارش رو پاک میکنم درست میشه اما دوباره وقتی رفرش میکنم دوباره برمیگرده حالت اصلیش (باید یه مقداری بدم و important بدم بهش)

    حالا چه مقداری باید بدم؟

  3. البته اینطور که معلومه فقط یکسری از آیکون ها تغییر سایز دادن

    مثلا توی هدر 5-6 تا بود که هیچ کدوم تغییر سایز ندادن

    توی فوتر هم 2 تا هست که فقط یکیش تغییر کرده

    اما توی قسمت اصلی صفحه کلاً تغییر سایز دادن :(

  4. سلام

    من از فونت آیکون توی قالبم استفاده کردم و وقتی که قالب رو به وردپرس تبدیل کردم (البته هنوز کامل نیست فقط فایل ها رو جدا کردم header,footer,index,...) آیکون هایی که استفاده کردم سایزشون کوچیک تر شدن!!!

    چرا؟

  5. کد های آجاکسم اینحوریه:


    //Ajax post data to server
    $.post('contact.php', post_data, function(response){
    if(response.type == 'error'){ //load json data from server and output message
    output = '<div class="error">'+response.text+'</div>';
    }else{
    output = '<div class="success">'+response.text+'</div>';
    //reset values in all input fields
    $("#contactinput[required=true], #contacttextarea[required=true]").val('');
    $("#contact").slideUp(); //hide form after success
    }
    $("#contact").hide().html(output).slideDown();
    }, 'json');
    }

  6. سلام

    من یه کد جی کوئری برای یک بخش سایت نوشتم و همون کد رو کپی کردن برای بخش دیگه سایت قرار دادم و فقط اومدم اسم کلاس ها رو تغییر دادم هم داخل کدهای HTML و هم توی جی کوئری ولی کار نمیکنه کدی که کپی کردم

    دلیلش چیه؟

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