انجمن


حذف کد های html در ارسال نظر  (۲۶ نوشته)

  • Ghasem Ebrahimy

    آفلاین
    عضو
    تعداد نوشته‌ها: ۹
    تشکر شده: ۱ بار
    # نوشته شده: ۱۱ سال پیش
    ۹ اسفند ۱۳۹۱ - ۱۶:۴۰

    با سلام
    چگونه می توانم در قسمت دیدگاه قسمتی که نوشته از کدهای Html استفاده کنید را حذف کنم.
    توی اتاق های مختلف گشتم اما فقط یک مطلب پیدا کردم و آن هم کاربردی نبود.
    باتشکر

    کاربران زیر به‌خاطر این نوشته تشکر کرده‌اند:
    تناسب اندام
  • ایران وردپرس

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۲۹
    تشکر شده: ۹۵۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۱۰ اسفند ۱۳۹۱ - ۱۱:۵۴

    درود .

    در پوشه ی قالبتون دنبال فایل comments.php بگردین .

    و در اون فایل کد زیر رو جستجو و بخش مربوط به اون رو حذف کنید :

    <?php echo allowed_tags(); ?>

  • Ghasem Ebrahimy

    آفلاین
    عضو
    تعداد نوشته‌ها: ۹
    تشکر شده: ۱ بار
    # نوشته شده: ۱۱ سال پیش
    ۱۲ اسفند ۱۳۹۱ - ۰۹:۲۵

    با تشکر از شما
    در قسمت کامنت پوسته جستجو کردم اما متاسفانه در جستجو چیزی پیدا نمی کرد.

  • ایران وردپرس

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۲۹
    تشکر شده: ۹۵۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۱۲ اسفند ۱۳۹۱ - ۱۳:۲۹

    سایتتون رو دیدم . زیر قسمت نظرات متنی بود که قسمتیش اینه :

    شما می‌توانید از این دستورات

    این متن رو در فایل کامنت یا function.php جستجو کنید . اگر پیدا شد حذف کنید و اگر پیدا نکردین فایل comment.php رو اینجا بذارید .

  • Ghasem Ebrahimy

    آفلاین
    عضو
    تعداد نوشته‌ها: ۹
    تشکر شده: ۱ بار
    # نوشته شده: ۱۱ سال پیش
    ۱۲ اسفند ۱۳۹۱ - ۱۵:۴۷

    با تشکر از شما
    متاسفانه موفق نشدم و همانطور که نوشته بودید متن comment.php را براتون گذاشتم
    باز هم متشکر

    <?php
    /**
    * The template for displaying Comments.
    *
    * The area of the page that contains both current comments
    * and the comment form. The actual display of comments is
    * handled by a callback to twentyten_comment which is
    * located in the functions.php file.
    *
    * @package WordPress
    * @subpackage Twenty_Ten
    * @since Twenty Ten 1.0
    */
    ?>

    <div id="comments">
    <?php if ( post_password_required() ) : ?>
    <p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></p>
    </div><!-- #comments -->
    <?php
    /* Stop the rest of comments.php from being processed,
    * but don't kill the script entirely -- we still have
    * to fully load the template.
    */
    return;
    endif;
    ?>

    <?php
    // You can start editing here -- including this comment!
    ?>

    <?php if ( have_comments() ) : ?>
    <h3 id="comments-title"><?php
    printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ),
    number_format_i18n( get_comments_number() ), '' . get_the_title() . '' );
    ?></h3>

    <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
    <div class="navigation">
    <div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'twentyten' ) ); ?></div>
    <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>
    </div> <!-- .navigation -->
    <?php endif; // check for comment navigation ?>

    <ol class="commentlist">
    <?php
    /* Loop through and list the comments. Tell wp_list_comments()
    * to use twentyten_comment() to format the comments.
    * If you want to overload this in a child theme then you can
    * define twentyten_comment() and that will be used instead.
    * See twentyten_comment() in twentyten/functions.php for more.
    */
    wp_list_comments( array( 'callback' => 'twentyten_comment' ) );
    ?>

    <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
    <div class="navigation">
    <div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'twentyten' ) ); ?></div>
    <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>
    </div><!-- .navigation -->
    <?php endif; // check for comment navigation ?>

    <?php
    /* If there are no comments and comments are closed, let's leave a little note, shall we?
    * But we only want the note on posts and pages that had comments in the first place.
    */
    if ( ! comments_open() && get_comments_number() ) : ?>
    <p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyten' ); ?></p>
    <?php endif; ?>

    <?php endif; // end have_comments() ?>

    <?php comment_form(); ?>

    </div><!-- #comments -->

  • ایران وردپرس

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۲۹
    تشکر شده: ۹۵۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۱۲ اسفند ۱۳۹۱ - ۱۶:۱۳

    درود .

    در همین کد های بالا، در اواخر کد ، عبارت زیر رو پیدا کنید :

    <?php comment_form(); ?>

    سپس اون رو با کد زیر جایگزین کنید :

    <?php comment_form(array('comment_notes_after' => '')); ?>

    سپس کش مرورگر و سایت رو پاک کنید و تست کنید که اون تگ ها حذف شدند یا خیر .
    خبر بدین :)

    موفق باشید

    کاربران زیر به‌خاطر این نوشته تشکر کرده‌اند:
    Ghasem Ebrahimy - -
  • Ghasem Ebrahimy

    آفلاین
    عضو
    تعداد نوشته‌ها: ۹
    تشکر شده: ۱ بار
    # نوشته شده: ۱۱ سال پیش
    ۱۲ اسفند ۱۳۹۱ - ۱۶:۵۷

    متشکرم.
    درست شد

  • ایران وردپرس

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۲۹
    تشکر شده: ۹۵۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۱۲ اسفند ۱۳۹۱ - ۱۷:۲۰

    Ghasemkhan گفت:
    متشکرم.
    درست شد

    خواهش میکنم .

    وردپرس فارسی همیشه همراه شماست :D

    همچنین استفاده از کلید تشکر به جای پاسخ دادن بهتر و مناسب تر است .

    موفق باشید .

    کاربران زیر به‌خاطر این نوشته تشکر کرده‌اند:
    aidin
  • aidin

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۳
    تشکر شده: ۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۲۱ اسفند ۱۳۹۱ - ۲۳:۱۸

    با سلام
    منم مدتها بود این مشکل رو داشتم و البته هنز هم دارم
    چطور میشه حلش کرد
    این مراحل بالا رو هم رفتم اما خط
    <?php comment_form(); ?>
    و یا
    <?php echo allowed_tags(); ?>
    که گفته بودید رو پیدا نکردم
    من باید چیکار کنم؟ :D

  • ایران وردپرس

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۲۹
    تشکر شده: ۹۵۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۲۲ اسفند ۱۳۹۱ - ۰۹:۵۹

    aidin گفت:
    با سلام
    منم مدتها بود این مشکل رو داشتم و البته هنز هم دارم
    چطور میشه حلش کرد
    این مراحل بالا رو هم رفتم اما خط
    <?php comment_form(); ?>
    و یا
    <?php echo allowed_tags(); ?>
    که گفته بودید رو پیدا نکردم
    من باید چیکار کنم؟ :D

    درود .

    لینک زیر رو باز کنید:

    http://forum.wp-persian.com/topic/29013#post-131955

    در اون قسمت ذکر شده که باید اون تگ رو که در فایل single.php هست پیدا کنید و با خط بعدی عوض کنید .

    هر دو کد برای نمونه گذاشته شده .

    اون لینک در حقیقت ماله همین تاپیک هست . تابع فراخوانی قسمت نظرات همان است که ذکر شده در اولین جعبه ی کد .

    به دو صورت ممکنه نظرات در سایت شما باشه :

    1- به صورت تابع . که در این صورت قالب شما باید فایلی با نام comments.php داشته باشه .

    2- به صورت php در فایل single.php وجود داشته باشه .

    در اینصورت شما باید دنبال یکی از کلمات موجود در سایت ، در اون فایل باشید تا بتونید ویرایش یا حذف کنید .

  • aidin

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۳
    تشکر شده: ۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۲۲ اسفند ۱۳۹۱ - ۱۴:۳۵

    من سرچ کردم ای کدها تو single.php و comments.php نبود
    فارسی هم خود جمله : شما می‌توانید از این دستورات html استفاده کنید هم سرچ کردم بازم تو هیچ فایلی پیداش نکردم
    این متن تو قالب نیست چون هر قالبی رو میگذارم زیر فیلد کامنت این متن میاد
    فک میکنم برای وردپرس 3.5.1 جدید باشه که نصب کردم

  • ایران وردپرس

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۲۹
    تشکر شده: ۹۵۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۲۲ اسفند ۱۳۹۱ - ۱۵:۲۸

    خیر مربوط به میشه به قالب . لینک دانلود قالبتون رو بدین تا چک کنم .

  • aidin

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۳
    تشکر شده: ۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۲۲ اسفند ۱۳۹۱ - ۱۵:۳۶

    IMDe گفت:
    خیر مربوط به میشه به قالب . لینک دانلود قالبتون رو بدین تا چک کنم .

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

  • ایران وردپرس

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۲۹
    تشکر شده: ۹۵۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۲۲ اسفند ۱۳۹۱ - ۱۶:۳۹

    aidin گفت:

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

    آها .

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

    اگر فایل comments.php رو طراحی کرده اید میتونید این کارو بکنید :

    http://forum.wp-persian.com/topic/29013#post-131955

  • aidin

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۳
    تشکر شده: ۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۲۲ اسفند ۱۳۹۱ - ۱۷:۴۳

    IMDe گفت:

    آها .

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

    اگر فایل comments.php رو طراحی کرده اید میتونید این کارو بکنید :

    http://forum.wp-persian.com/topic/29013#post-131955

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

  • ایران وردپرس

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۲۹
    تشکر شده: ۹۵۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۲۲ اسفند ۱۳۹۱ - ۱۹:۵۲

    برای تشکر کردن از دکمه‌ی تشکر استفاده کنید.

    کد رو قرار بدین تا یه نگاهی بندازیم . اگر موجود بود که برای حذف بهتون کمک خواهم کرد .

    کاربران زیر به‌خاطر این نوشته تشکر کرده‌اند:
    aidin
  • aidin

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۳
    تشکر شده: ۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۲۲ اسفند ۱۳۹۱ - ۲۰:۲۲

    خیلی ممنونم
    من با نرم افزار آرتیستر طراحی کردم و از فایل CSS شکل و شمایل به سایت دادم اما فایلهای PHP که آرتیستر ساخته رو تغییری ندادم
    این comments.php

    <?php
    
    /**
     *
     * comments.php
     *
     * The comments template. Used to display post or page comments and comment form.
     *
     * Additional settings are available under the Appearance -> Theme Options -> Comments.
     *
     */
    
    if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    	die ('Please do not load this page directly. Thanks!');
    
    if (post_password_required()) {
    	theme_post_wrapper(array('content' => '<p class="nocomments">' . __('This post is password protected. Enter the password to view any comments.', THEME_NS) . '</p>'));
    	return;
    }
    
    if (have_comments()){
    	ob_start();
    	printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), THEME_NS ), number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' );
    	theme_post_wrapper(array('content'=>'<h4 id="comments">' .ob_get_clean() . '</h4>'));
    	$prev_link = get_previous_comments_link(__('Newer Comments <span class="meta-nav">&rarr;</span>', THEME_NS));
    	$next_link =  get_next_comments_link(__('<span class="meta-nav">&larr;</span> Older Comments', THEME_NS));
    	theme_page_navigation(array('prev_link' => $prev_link, 'next_link' => $next_link));
    	echo '<ul id="comments-list">';
    	wp_list_comments('type=all&callback=theme_comment');
    	echo '</ul>';
    	theme_page_navigation(array('prev_link' => $prev_link, 'next_link' => $next_link));
    }
    if (function_exists('comment_form')){
    	ob_start();
    	$args = array();
    	if(theme_get_option('theme_comment_use_smilies'))
    	{
    		function theme_comment_form_field_comment($form_field){
    			theme_include_lib('smiley.php');
    			return  theme_get_smilies_js() . '<p class="smilies">' . theme_get_smilies() . '</p>' . $form_field;
    		}
    		add_filter('comment_form_field_comment', 'theme_comment_form_field_comment');
    	}
    	comment_form();
    	theme_post_wrapper(array('content' => str_replace(array(' id="respond"', 'type="submit"'), array('', 'class="art-button" type="submit"'), ob_get_clean()), 'id' => 'respond'));
    	return;
    }
    
    if ('open' == $post->comment_status) {
    	ob_start();
    ?>
    <h3 id="comments-title"><?php comment_form_title( __('Leave a Reply', THEME_NS), __('Leave a Reply to %s', THEME_NS) ); ?></h3>
    <div class="cancel-comment-reply"><small><?php cancel_comment_reply_link(); ?></small></div>
    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    <p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', THEME_NS), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())); ?></p>
    <?php else : ?>
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    <?php if ( $user_ID ) : ?>
    <p><?php printf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>', THEME_NS), admin_url( 'profile.php' ), $user_identity, wp_logout_url(get_permalink())); ?></a></p>
    <?php else : ?>
    <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
    <label for="author"><small><?php _e('Name', THEME_NS); ?> <?php if ($req) _e("(required)", THEME_NS); ?></small></label></p>
    <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
    <label for="email"><small><?php _e('Your email address will not be published.', THEME_NS); ?> <?php if ($req) _e("(required)", THEME_NS); ?></small></label></p>
    <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
    <label for="url"><small><?php _e('Website', THEME_NS); ?></small></label></p>
    <?php endif; ?>
    <!--<p><small><?php printf( __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', THEME_NS), ' <code>' . allowed_tags() . '</code>' ) ?></small></p>-->
    <p><textarea name="comment" id="comment" cols="40" rows="10" tabindex="4"></textarea></p>
    <p>
    	<span class="art-button-wrapper"><span class="art-button-l"> </span><span class="art-button-r"> </span>
    		<input class="art-button" type="submit" name="submit" tabindex="5" value="<?php _e('Submit Comment', THEME_NS); ?>" />
    	</span>
    	<?php comment_id_fields(); ?>
    </p>
    <?php do_action('comment_form', $post->ID); ?>
    </form>
    <?php endif;?>
    <?php
    	theme_post_wrapper(array('content' => ob_get_clean(), 'id' => 'respond'));
    }
  • ایران وردپرس

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۲۹
    تشکر شده: ۹۵۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۲۲ اسفند ۱۳۹۱ - ۲۱:۱۵

    درود بر شما .

    کد زیر رو از همین کدهایی که دادین پیدا و حذف کنید :

    <!--<p><small><?php printf( __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', THEME_NS), ' <code>' . allowed_tags() . '</code>' ) ?></small></p>-->

    موفق باشید

  • ایران وردپرس

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۲۹
    تشکر شده: ۹۵۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۲۲ اسفند ۱۳۹۱ - ۲۱:۱۸

    @ aidin

    فکر میکنم کد رو خودم ویرایش کنم بهتره . یه وقت مشکل به وجود نیاد ( به واسطه ی ویرایش نادرست ) و بعدا بگید بنده کارم رو نمیدونم .

    کد زیر رو با کدهای فعلیتون جایگزین کنید :

    <?php
    
    /**
     *
     * comments.php
     *
     * The comments template. Used to display post or page comments and comment form.
     *
     * Additional settings are available under the Appearance -> Theme Options -> Comments.
     *
     */
    
    if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    	die ('Please do not load this page directly. Thanks!');
    
    if (post_password_required()) {
    	theme_post_wrapper(array('content' => '<p class="nocomments">' . __('This post is password protected. Enter the password to view any comments.', THEME_NS) . '</p>'));
    	return;
    }
    
    if (have_comments()){
    	ob_start();
    	printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), THEME_NS ), number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' );
    	theme_post_wrapper(array('content'=>'<h4 id="comments">' .ob_get_clean() . '</h4>'));
    	$prev_link = get_previous_comments_link(__('Newer Comments <span class="meta-nav">&rarr;</span>', THEME_NS));
    	$next_link =  get_next_comments_link(__('<span class="meta-nav">&larr;</span> Older Comments', THEME_NS));
    	theme_page_navigation(array('prev_link' => $prev_link, 'next_link' => $next_link));
    	echo '<ul id="comments-list">';
    	wp_list_comments('type=all&callback=theme_comment');
    	echo '</ul>';
    	theme_page_navigation(array('prev_link' => $prev_link, 'next_link' => $next_link));
    }
    if (function_exists('comment_form')){
    	ob_start();
    	$args = array();
    	if(theme_get_option('theme_comment_use_smilies'))
    	{
    		function theme_comment_form_field_comment($form_field){
    			theme_include_lib('smiley.php');
    			return  theme_get_smilies_js() . '<p class="smilies">' . theme_get_smilies() . '</p>' . $form_field;
    		}
    		add_filter('comment_form_field_comment', 'theme_comment_form_field_comment');
    	}
    	comment_form();
    	theme_post_wrapper(array('content' => str_replace(array(' id="respond"', 'type="submit"'), array('', 'class="art-button" type="submit"'), ob_get_clean()), 'id' => 'respond'));
    	return;
    }
    
    if ('open' == $post->comment_status) {
    	ob_start();
    ?>
    <h3 id="comments-title"><?php comment_form_title( __('Leave a Reply', THEME_NS), __('Leave a Reply to %s', THEME_NS) ); ?></h3>
    <div class="cancel-comment-reply"><small><?php cancel_comment_reply_link(); ?></small></div>
    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    <p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', THEME_NS), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())); ?></p>
    <?php else : ?>
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    <?php if ( $user_ID ) : ?>
    <p><?php printf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>', THEME_NS), admin_url( 'profile.php' ), $user_identity, wp_logout_url(get_permalink())); ?></a></p>
    <?php else : ?>
    <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
    <label for="author"><small><?php _e('Name', THEME_NS); ?> <?php if ($req) _e("(required)", THEME_NS); ?></small></label></p>
    <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
    <label for="email"><small><?php _e('Your email address will not be published.', THEME_NS); ?> <?php if ($req) _e("(required)", THEME_NS); ?></small></label></p>
    <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
    <label for="url"><small><?php _e('Website', THEME_NS); ?></small></label></p>
    <?php endif; ?>
    <p><textarea name="comment" id="comment" cols="40" rows="10" tabindex="4"></textarea></p>
    <p>
    	<span class="art-button-wrapper"><span class="art-button-l"> </span><span class="art-button-r"> </span>
    		<input class="art-button" type="submit" name="submit" tabindex="5" value="<?php _e('Submit Comment', THEME_NS); ?>" />
    	</span>
    	<?php comment_id_fields(); ?>
    </p>
    <?php do_action('comment_form', $post->ID); ?>
    </form>
    <?php endif;?>
    <?php
    	theme_post_wrapper(array('content' => ob_get_clean(), 'id' => 'respond'));
    }
    کاربران زیر به‌خاطر این نوشته تشکر کرده‌اند:
    aidin
  • aidin

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۳
    تشکر شده: ۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۲۲ اسفند ۱۳۹۱ - ۲۲:۱۲

    خیلی خیلی ممنونم از شما و صد در صد مطمئنم شما کارتون رو میدونید :)
    این کدها رو جایگزین کردم اما متاسفانه درست نشد :(

  • ایران وردپرس

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۲۹
    تشکر شده: ۹۵۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۲۳ اسفند ۱۳۹۱ - ۱۲:۱۶

    عجیبه !!

    شما میخواهید این کدها رو هم تست کنید :

    ** کد زیر رو با تمامی کدهای comments.php جایگزین کنید **

    <?php
    /**
     * The template for displaying Comments.
     *
     * The area of the page that contains both current comments
     * and the comment form. The actual display of comments is
     * handled by a callback to twentyten_comment which is
     * located in the functions.php file.
     *
     * @package WordPress
     * @subpackage Twenty_Ten
     * @since Twenty Ten 1.0
     */
    ?>
    
    			<div id="comments">
    <?php if ( post_password_required() ) : ?>
    				<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></p>
    			</div><!-- #comments -->
    <?php
    		/* Stop the rest of comments.php from being processed,
    		 * but don't kill the script entirely -- we still have
    		 * to fully load the template.
    		 */
    		return;
    	endif;
    ?>
    
    <?php
    	// You can start editing here -- including this comment!
    ?>
    
    <?php if ( have_comments() ) : ?>
    			<h3 id="comments-title"><?php
    			printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ),
    			number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' );
    			?></h3>
    
    <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
    			<div class="navigation">
    				<div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'twentyten' ) ); ?></div>
    				<div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
    			</div> <!-- .navigation -->
    <?php endif; // check for comment navigation ?>
    
    			<ol class="commentlist">
    				<?php
    					/* Loop through and list the comments. Tell wp_list_comments()
    				 * If you want to overload this in a child theme then you can
    					 * to use twentyten_comment() to format the comments.
    					 * define twentyten_comment() and that will be used instead.
    					 * See twentyten_comment() in twentyten/functions.php for more.
    					 */
    					wp_list_comments( array( 'callback' => 'twentyten_comment' ) );
    				?>
    			</ol>
    
    <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
    			<div class="navigation">
    				<div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'twentyten' ) ); ?></div>
    				<div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
    			</div><!-- .navigation -->
    <?php endif; // check for comment navigation ?>
    
    	<?php
    	/* If there are no comments and comments are closed, let's leave a little note, shall we?
    	 * But we only want the note on posts and pages that had comments in the first place.
    	 */
    	if ( ! comments_open() && get_comments_number() ) : ?>
    		<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyten' ); ?></p>
    	<?php endif;  ?>
    
    <?php endif; // end have_comments() ?>
    
    <?php comment_form(array('comment_notes_after' => '')); ?>
    
    </div><!-- #comments -->
    کاربران زیر به‌خاطر این نوشته تشکر کرده‌اند:
    aidin
  • aidin

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۳
    تشکر شده: ۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۲۳ اسفند ۱۳۹۱ - ۲۳:۳۷

    با تشکر مجدد از شما
    اون کدهای زیر رو حذف کردید اما دو خط ارور داد رو لوکال هاست و رو وب هم گذاشتم همین ارورها رو داشت

    : call_user_func() expects parameter 1 to be a valid callback, function 'twentyten_comment' not found or invalid function name in C:\xampp\htdocs\WP\wp-includes\comment-template.php on line 1334

    Warning: call_user_func() expects parameter 1 to be a valid callback, function 'twentyten_comment' not found or invalid function name in C:\xampp\htdocs\WP\wp-includes\comment-template.php on line 1334

    علاوه بر این کامنتهای تو در تو رو هم نمیاره دیگه صفحه کامنت ها

    واقعا ممنونم از شما و وقتی که اختصاص میدید

    کاربران زیر به‌خاطر این نوشته تشکر کرده‌اند:
    ایران وردپرس
  • aidin

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۳
    تشکر شده: ۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۳۰ اسفند ۱۳۹۱ - ۱۲:۵۷

    متاسفانه مشکل من حل نشد :(

  • aidin

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۳
    تشکر شده: ۲ بار
    # نوشته شده: ۱۱ سال پیش
    ۱ فروردین ۱۳۹۲ - ۱۶:۲۱

    با سلام
    بالاخره تونستم مشکلش رو حل کنم
    به این صورت:

    در فایل comments.php به جای
    comment_form();
    این کد رو قرار دادم

    $comments_args = array(
              'comment_notes_before' => '',
              'comment_notes_after' => ''
    );
    comment_form($comments_args);

    البته خط اولش رو حذف کردم چون فقط میخواستم زیر فیلد کامنت چیزی نیاد

    $comments_args = array(
              'comment_notes_after' => ''
    );
    comment_form($comments_args);

    از لینک http://forum.wp-parsi.com/topic/5957-%D8%AD%D8%B0%D9%81-%DA%A9%D8%AF-%D9%86%D8%B8%D8%B1%D8%A7%D8%AA/

    کاربران زیر به‌خاطر این نوشته تشکر کرده‌اند:
    ایران وردپرس
  • Moeini

    آفلاین
    عضو فعال
    تعداد نوشته‌ها: ۵۵۹
    تشکر شده: ۶۷۹ بار
    # نوشته شده: ۱۱ سال پیش
    ۲ فروردین ۱۳۹۲ - ۰۱:۴۸

    http://php-press.com/disable-html-code-wordpress-comments.html

    کاربران زیر به‌خاطر این نوشته تشکر کرده‌اند:
    aidin
  • saboo

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱
    # نوشته شده: ۸ سال پیش
    ۱ مهر ۱۳۹۴ - ۱۶:۴۶

    سلام
    این برای حذف این نوشته از روی همه ی تم های ورد پرسی که این مشکل رو دارند، جواب نمیده!
    یک راه ساده ی نیم خطی هست!
    1-وارد ویرایش استایل پوسته بشید.
    2-کد زیر را در انتها وارد کنید و به روزرسانی کنید:
    .form-allowed-tags { display:none; }
    3-بعد وارد شیوه‌نامه‌ی زبان‌های راست به چپ یا همون(rtl.css) بشید.
    4- دوباره کدی رو که گفتم اینجا هم در انتها وارد وبه روز رسانی کنید.
    تمام!
    یک نکته ای که هیچ جا نمیگن اینه که چون تم های فارسی، شیوه نامه ی زبان های از راست به چپ دارند. باید هرکاری تویstyle.css انجام دادین، تویrtl.css هم بایدانجام بشه، منتها هرچی توی استایل راسته برای rtl باید چپ باشه و برعکس!
    ندونستن دو نکته ی آخر خیلی من رو به زحمت انداخت.
    شاد باشید.

درباره‌ی این موضوع