จะเอาข้อความ "ปิดการแสดงความเห็น" ออกจากบทความอย่างไรครับ

by goodman

Home Forums WordPress เวิร์ดเพรส จะเอาข้อความ "ปิดการแสดงความเห็น" ออกจากบทความอย่างไรครับ

This topic contains 2 replies, has 3 voices, and was last updated by  bABY 11 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #510

    goodman
    Member

    เขียนบทความแล้ว ไม่ต้องการให้ผู้เข้าชมแสดงความคิดเห็น เลยปิดการแสดงความคิดเห็น เวลาโพสต์ใต้บทความยังมาแสดงข้อความว่า “ปิดการแสดงความเห็น” จะเอาออกอย่างไรครับ  ขอบคุณครับ

     

    #511

    amnad
    Member

    หา comment ในทุกๆไฟล์ ในธีม ปิด ด้วย <—  ?php code comment  ? —->

    #541

    bABY
    Member

    ลองดูในไฟล์ชื่อ comment.php (ถ้าไม่มีก็เขียนอยู่ในไฟล์อื่น ลองหาดู)

    ให้ search คำว่า “ปิดการแสดงความเห็น” หรืออาจจะเป็นคำอื่นแล้วแต่คนเขียน theme เขาจะเขียนขึ้นมา จะเจอ code ทำนองนี้

    <?php if ( comments_open() ) : ?>

    <!– If comments are open, but there are no comments. –>

    <?php else : // comments are closed ?>

    <!– If comments are closed. –>

    <p class=”nocomments”>ปิดการแสดงความเห็น</p>

    <?php endif; ?>

     

    แก้ตรง

    <p class=”nocomments”>ปิดการแสดงความเห็น</p>

    เป็น

    <p class=”nocomments”></p>

     

    แบบนี้แหละง่ายดี (อย่าลบ code ออกหมดถ้าไม่แน่ใจว่าวันหลังอยากจะเปลี่ยนใจกลับมาใช้อีกหรือเปล่า)

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

 
© 2024 WordPress ภาษาไทย Powered by Wordpress | Sponsor by wordpress