رفتن به مطلب

A-fshin

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

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

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

  • روز های برد

    11

نوشته‌ها ارسال شده توسط A-fshin

  1. درود براساس بازدید کاستوم پست تایپ movie با تاکسونومی movie-genre است.به صورت زیر تست کنید( بر اساس نظرات ) :


    <ul>
    <?php
    $pop_movies = new WP_Query( array(
    'post_type' => 'movies',
    'posts_per_page' => 6,
    'orderby' => 'comment_count',
    'order' => 'DESC',
    'tax_query' => array(
    array(
    'taxonomy' => 'movie-genre',
    'field' => 'id',
    'terms' => get_option("films_category")
    )
    )
    ));
    while( $pop_movies->have_posts() ) : $pop_movies->the_post();
    ?>
    <li><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail("index_movie"); ?><span><?php max_length(get_the_title(), 45); ?></span></a></li>
    <?php endwhile; wp_reset_query(); ?>
    </ul>

    • امتیاز 1
  2. درود.ماده ی 12 فصل سوم جرائم رایانه ای را مطالعه کنید.کپی برداری از طرح های دیگران نیز مربوط به همین قسمت خواهد شد.طراح گرافیک پوسته ی همیار وردپرس Erfanix.com می باشد که مسلما حق شکایت خواهد داشت.


    http://www.cyberpolice.ir/page/2431

    • امتیاز 3
  3. درود.تست کنید


    <?php
    // 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"><?php _e('This post is password protected. Enter the password to view comments','mythemeshop'); ?>.</p>
    <?php return; } ?>
    <!-- You can start editing here. -->
    <?php if ( have_comments() ) : ?>
    <div id="comments">
    <div id="response">
    <?php global $aria_req; $comments_args = array(
    'must_log_in' => '<p class="must-log-in">' . sprintf('شما باید <a href="%s">وارد شوید</a> تا نظر بنویسید.' , wp_login_url( apply_filters( 'the_permalink', get_permalink( ) ) ) ) . '</p>',
    'logged_in_as' => '<p class="logged-in-as">' . sprintf('وارد شده به عنوان <a href="%1$s">%2$s</a>. <a href="%3$s" title="خروج از این حساب">خروج؟</a>', admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( ) ) ) ) . '</p>',
    'title_reply'=>''.__('دیدگاه شما','mythemeshop').'',
    'comment_notes_after' => '',
    'label_submit' => 'ارسال متن شما',
    'comment_field' => '
    <p class="comment-form-comment"><label for="comment">'.__('دیدگاه:','mythemeshop').'<span class="required">*</span></label><textarea id="comment" name="comment" cols="45" rows="5" aria-required="true"></textarea></p>',
    'fields' => apply_filters( 'comment_form_default_fields',
    array(
    'author' => '<p class="comment-form-author">'
    . '<label for="author">' . __( 'نام', 'mythemeshop' ) . ':<span class="required">*</span></label>'
    . ( $req ? '' : '' ) . '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',

    'email' => '<p class="comment-form-email"><label for="email">' . __( 'ایمیل', 'mythemeshop' ) . ':<span class="required">*</span></label>'
    . ( $req ? '' : '' ) . '<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',

    'url' => '<p class="comment-form-url"><label for="url">' . __( 'وب سایت', 'mythemeshop' ) . ':</label>' .
    '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>'
    ))
    );
    comment_form($comments_args); ?>
    </div>
    <div class="heading"><i class="icon-comments-alt"></i><?php comments_number(__('بدون دیدگاه','mythemeshop'), __('یک دیدگاه','mythemeshop'), __('% دیدگاه','mythemeshop') );?></div>
    <ol class="commentlist group">
    <div class="navigation">
    <div class="alignleft"><?php previous_comments_link() ?></div>
    <div class="alignright"><?php next_comments_link() ?></div>
    </div>
    <?php wp_list_comments(); ?>
    <div class="navigation bottomnav">
    <div class="alignleft"><?php previous_comments_link() ?></div>
    <div class="alignright"><?php next_comments_link() ?></div>
    </div>
    </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"></p>
    <?php endif; ?>
    <?php endif; ?>
    <?php if ('open' == $post->comment_status) : ?>

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

    • امتیاز 3
  4. درود.دوست عزیز پوسته ی شما پریموم هست و سایتی که این قالب رو به شما داده ناقض کپی رایت بهتره از خود فروشنده درخواست کنید تا براتون nofollow کنه.بهتره قوانین رو مطالعه کنید بحث در مورد پوسته های پرمیوم ممنوع است.


    http://themeforest.net/item/enfold-responsive-multipurpose-theme/4519990

    • امتیاز 2
  5. درود.از کوئری استفاده می کنید یا لوپ اصلی ؟

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

    اما اگه از کوئری استفاده می کنید از posts_per_page استفاده کنید

    • امتیاز 3
  6. وردپرس در کتابخونه اش جی کوئری داره و کار غیرحرفه ای اینه که یه جی کوئری دیگه هم اضافه کنید.کدهاتون رو در یه فایل ادغام و رجیتسر کنید و از جی کوئری خود وردپرس استفاده کنید.


    add_action( 'wp_enqueue_scripts', 'persian_register' );
    function persian_register() {
    wp_register_script( 'persian-scripts', get_template_directory_uri() . '/js/persian-scripts.js', array( 'jquery' ), false, false );
    wp_enqueue_script( 'persian-scripts' );
    }


    http://codex.wordpress.org/Function_Reference/wp_register_script

    کدرو به این صورت تست کنید


    <script type="text/javascript">
    var $ = jQuery.noConflict();
    $(document).ready(function(){
    $('a[href^="#"]').on('click',function (e) {
    e.preventDefault();
    var target = this.hash;
    var $target = $(target);
    $('html, body').stop().animate({
    'scrollTop': $target.offset().top
    }, 900, 'swing', function () {
    window.location.hash = target;
    });
    });
    });
    </script>

    • امتیاز 1
  7. درود.استایل و فایل js افزونه ها رو می تونید deregister کنید و همه رو با هم ادغام و در فایلی جدا قرار بدید و سپس رجیستر کنید.

    برای استایل:


    http://codex.wordpress.org/Function_Reference/wp_deregister_style
    http://codex.wordpress.org/Function_Reference/wp_register_style

    برای جاوااسکریپت:


    http://codex.wordpress.org/Function_Reference/wp_deregister_script
    http://codex.wordpress.org/Function_Reference/wp_register_script

    • امتیاز 2
  8. درود.رول رو بگیرید و دسترسی رو کم کنید.نمونه ( در فانکشن قرار بدید و تست کنید ) :


    add_action( 'admin_init', 'remove_cap_author' );
    function remove_cap_author(){
    $role = get_role('author');
    $role->remove_cap('publish_posts');
    }

    اطلاعات بیشتر


    http://codex.wordpress.org/Function_Reference/remove_cap

    • امتیاز 3
  9. درود یه راه سنجاق کردن مطلب هست که در صفحه نخست نشون داده می شه و برای نمایش در باقی صفحات در فایل های مربوطه قالب کوئری قرار بدید

    اطلاعات بیشتر:


    http://codex.wordpress.org/Sticky_Posts

    • امتیاز 3
×
×
  • اضافه کردن...