• Home
  • About
    • My Profile
    • Service
    • Portfolio
  • Contact
  • Blogs
Shopping cart close
JODBUSH
  • Home
  • About
    • My Profile
    • Service
    • Portfolio
  • Contact
  • Blogs
close
30 ต.ค.
Blogs

วิธีการเปลี่ยน Custom Logo WordPress Login

  • 29/11/2018
  • Posted by weerapol
  • Login, Logo
  • Leave a comment

สวัสดีครับวันนี้ผมจะมาสอนการเปลี่ยน Logo Login wordpress สำหรับใครที่ต้องการจะใช้หน้านี้เป็นหน้าที่ใช้ในการเข้าสู่ระบบ หรือ สมัครสมาชิก แต่เราต้องการจะเปลียน รูป Logo เป็นของเราเอง เราจะทำอย่างไร โดยวิธีการทำก็จะมีหลายที่วิธี ที่เลือกใช้ได้ แต่วิธีที่ผมจะมาสอนคือ การเพิ่มโค๊ดใน Function Theme เพราะว่ามันเพิ่มคำสั่งแค่นิดเดียว และ ไม่ต้องติดตั้ง Plugin เพิ่ม สำหรับวิธีการทำ เราไป ดูกันเลยครับ

 

วิธีการทำ

เรามาเริ่มกันเลย ครับ ลำดับแรก ให้ เราทำการ Upload ไฟล์ Logo ของเราที่ต้องการที่จะเปลียนโดยปกติ Logo จะเป็นสีเหลียมจัตุรัส  แต่ถ้าใครต้องการให้ เป็น Logo แนว สี่เหลี่ยมผืนผ้า ก็สามารถปรับแต่ CSS เข้าไปได้เลยครับ เพิ่มคำสั่งต่อไปจากคำสั่งที่ผม ยกตัวอย่างไว้  เอาล่ะครับ หลังจาก  Upload ไฟล์ เสร็จแล้วก็ ให้ทำการ  Copy โค๊ดตัวอย่างที่ผม ใส่ไว้ด้านล้าง ไปวางไว้ใน function.php  ในโฟเดอร์ Theme ที่เราใช้งาน ให้ทำการไปวางต่อท้าย ของคำสั่งทั้งหมด ที่มีอยู่ใน function.php อยู่แล้ว เพื่อป้องกันการเกิดปัญหาที่จะทำให้โค๊ดบางคำสั่งไม่ทำงาน หลังจาก ที่ นำไป Paste เรียบร้อย ให้ทำการเปลี่ยน URL รูปภาพ ในคำสั่ง “background-image”  และนำ URL ที่อยู่ของของไฟล์ Logo ที่เรา ต้องการจะเปลี่ยนมาเพิ่ม เท่านี้ Logo Login ใน WordPress ก็จะเปลี่ยนเป็น Logo ของเราแล้วครับ

function my_login_logo_one() { 
?> 
    <style type="text/css"> 
     body.login div#login h1 a {
     background-image: url(https://ที่อยู่ของไฟล์ในเว็บไซต์/ชื่อไฟล์.png); //Add your own logo image 
     padding-bottom: 30px; 
     } 
   </style>
<?php 
} add_action( 'login_enqueue_scripts', 'my_login_logo_one' );

หลังจากดำเนินการเรียบร้อย หน้าตาของ Logo ที่เปลี่ยนจะออกมาประมาณนี้ครับ

 

 

หลังจากที่ทำการใส่ โค๊ด ถูกต้องให้ทำการลองทดสอบเรียก URL https://www.ชื่อเว็บไซต์.com/wp-login.php ว่าเมื่อมีการเข้า wp-login.php แล้ว Logo ที่เราใส่ไว้เปลียนหรือป่าว ถ้ายังไม่เปลี่ยนแต่คิดว่าใส่ URL ถูกต้องแน่นอน ให้ทำการ Clear Browser Cache ดูครับผม  สำหรับใครที่เป็นมือใหม่ยังไม่เข้าใจว่าใส่ตรงไหน ลองคอมเม้นไว้ได้เลยครับ หรือทักมาถามใน Facebook FanPage ก็ได้ครับผม

 

  • FacebookFacebook
  • XTwitter
  • LINELine
  • Facebook
  • X
  • Email
  • Pinterest
  • LinkedIn
Close
Recent Posts
  • เปลี่ยน WordPress 5.0 ใช้งาน Classic Editor

  • WordPress เพิ่มความปลอดภัยกับ Hosting

  • WordPress เพิ่มความปลอดภัยในส่วนของ Database

  • WordPress เพิ่มความปลอดภัยในหน้า Admin Dashboard

  • WordPress เพิ่มป้องกันการโจมตีจาก brute force attacks

  • Traffic มีความสำคัญต่อ SEO เป็นอย่างมาก

  • การตั้งค่าเปิดการใช้งาน HSTS บน Cloudflare

  • การเปิดการใช้งาน HSTS ใน WordPress

  • Facebook แอบเพิ่ม Parameter ในการเชื่อมโยงลิงค์

  • ตรวจสอบ สถานะ Cloudflare CDN

Copyright © 2014-2023 Jodbush.com All Right Reserve  | Designed By Weerapol Chindamat

JODBUSH
JODBUSH
creative web design
  • หน้าแรก
  • รู้จักเรา
    • เกี่ยวกับเรา
    • สนใจทำเว็บไซต์
    • ตัวอย่างผลงาน
  • ช่องทางการติดต่อ
  • บทความ
  • My Profile
  • Service
  • Contact Form
Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
View preferences
{title} {title} {title}