Wordpress: chỉnh sửa trang 404 - cách thức hoạt động
Nếu bạn chỉnh sửa trang 404 trong WordPress, khách truy cập sẽ được bồi thường ít nhất bằng một tin nhắn hay nếu không tìm thấy trang. Ở đây chúng tôi chỉ ra nơi bạn có thể chỉnh sửa trang chính xác.
Wordpress: Cách chỉnh sửa trang 404
Tất nhiên, giải pháp tốt nhất là trang "404 - Không tìm thấy trang" hoàn toàn không xuất hiện, nghĩa là tất cả các tham chiếu trên trang của bạn đều chính xác. Tuy nhiên, một lỗi có thể xuất hiện và sau đó ít nhất một trang hấp dẫn sẽ trỏ đến nó.
- Trong khu vực quản trị của bạn, bạn sẽ tìm thấy mục "Thiết kế" trong menu bên trái. Nhấp vào điểm, điểm phụ "Trình chỉnh sửa" sẽ xuất hiện.
- Nếu bạn nhấp vào "Trình chỉnh sửa", một danh sách các tệp sẽ xuất hiện, bao gồm tệp "404.php" và một cửa sổ mã ở giữa. Tại đây bạn có thể chỉnh sửa tệp 404.
- Nếu tệp không xuất hiện trong danh sách, hãy truy cập máy chủ bằng chương trình FTP. Ở đó bạn sẽ tìm thấy 404.php trong "wp-content / Themes / default".
- Trong tệp PHP, tìm kiếm "" giữa các thẻ h2. Bạn có thể thay thế phần này bằng mã của riêng bạn - miễn là bạn quen thuộc với PHP.
Thay thế: Một plugin 404
Nếu bạn không biết gì về PHP, bạn nên tránh xa việc chỉnh sửa tệp. Thay vào đó, sử dụng một plugin thay thế.
- Trang lỗi 404 có thể dễ dàng được thêm vào bằng các plugin đặc biệt, chẳng hạn như "Bốn mươi bốn - Plugin 404 cho WordPress".
Mẹo: Cách nhúng hình nền trên trang 404
Trong mẹo thực tế tiếp theo, chúng tôi sẽ cho bạn biết cách tạo biểu mẫu liên hệ của riêng bạn trong Wordpress.