จะตรวจสอบความถูกต้องของช่องค้นหาไซต์ลิงก์ของ WordPress JSON-LD Schema ได้อย่างไร แก้ไขคำแนะนำ URL ของหน้าการค้นหา
เผยแพร่แล้ว: 2020-04-25 โดยค่าเริ่มต้น Google รองรับ Sitelinks search box
แต่เราจำเป็นต้องตรวจสอบให้แน่ใจว่ามีการติดตั้งวิธีที่ถูกต้องบนไซต์ WordPress
ช่องค้นหาไซต์ลิงก์คืออะไร
ดังที่คุณเห็นด้านล่าง ช่องค้นหาไซต์ลิงก์เป็นช่องค้นหาที่ช่วยให้ผู้ใช้ค้นหาคำต่างๆ ได้อย่างรวดเร็ว
พวกเขาไม่ต้องไปที่ไซต์ของคุณเพื่อค้นหา ผลลัพธ์จะปรากฏบนหน้าผลการค้นหาของ Google (SERP) เอง
ให้คำแนะนำการค้นหาแบบเรียลไทม์แก่ผู้ใช้
วันนี้ใน broken
ในขณะที่ดูปัญหาอื่นๆ เราพบว่าช่องค้นหา Sitelinks ของเราใช้งานไม่ได้
ใช้เวลาสักครู่ แต่เราแก้ไข URL ของช่องค้นหาไซต์ลิงก์ใน Crunchify ฉันต้องการแบ่งปันเคล็ดลับเดียวกันกับผู้อ่าน Crunchify ทุกคน
ขั้นตอนที่ 1. ติดตั้งปลั๊กอิน SEO WordPress
ตรวจสอบให้แน่ใจว่าคุณได้ติดตั้งปลั๊กอิน Yoast SEO WordPress All in One SEO Pack ยังรองรับ JSON-LD และกล่องค้นหาไซต์ลิงก์โดยค่าเริ่มต้น
เราใช้เหมือนกันตั้งแต่ไม่กี่ปีที่ผ่านมาและจนถึงตอนนี้ก็ดี ตามค่าเริ่มต้น ปลั๊กอิน Yoast SEO จะเพิ่ม JSON-LD schema markup
ในแต่ละหน้าของคุณ เพียงเปิดใช้งานปลั๊กอินและคุณจะได้รับหน้าการค้นหาที่กำหนดเอง
JSON-LD คืออะไร
JSON-LD ย่อมาจาก
JavaScript Object Notation for Linked Data
ซึ่งประกอบด้วยอาร์เรย์หลายมิติ)
นี่คือตัวอย่าง JSON-lD จาก home page
Crunchify :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
{ "@context" : "https://schema.org" , "@graph" : [ { "@type" : "WebSite" , "@id" : "https://crunchify.com/#website" , "url" : "https://crunchify.com/" , "name" : "Crunchify" , "inLanguage" : "en-US" , "description" : "Largest free Technical and Blogging resource site for Beginner. We help clients transform their great ideas into reality!" , "potentialAction" : [ { "@type" : "SearchAction" , "target" : "https://crunchify.com/search/?q={search_term_string}" , "query-input" : "required name=search_term_string" } ] } , { "@type" : "CollectionPage" , "@id" : "https://crunchify.com/#webpage" , "url" : "https://crunchify.com/" , "name" : "Crunchify \u2022 Largest free Technical and Blogging resource site for Beginner. We help clients transform their great ideas into reality!" , "isPartOf" : { "@id" : "https://crunchify.com/#website" } , "inLanguage" : "en-US" , "description" : "Largest free Technical, Blogging resource site for Beginners. We help clients transform their great ideas into reality!" } ] } |
นี่คือตัวอย่าง JSON-LD ใน blog post
ตัวอย่าง:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
{ "@context" : "https://schema.org" , "@graph" : [ { "@type" : "WebSite" , "@id" : "https://crunchify.com/#website" , "url" : "https://crunchify.com/" , "name" : "Crunchify" , "inLanguage" : "en-US" , "description" : "Largest free Technical and Blogging resource site for Beginner. We help clients transform their great ideas into reality!" , "potentialAction" : [ { "@type" : "SearchAction" , "target" : "https://crunchify.com/search/?q={search_term_string}" , "query-input" : "required name=search_term_string" } ] } , { "@type" : "ImageObject" , "@id" : "https://crunchify.com/step-by-step-guide-to-enable-https-or-ssl-correct-way-on-apache-tomcat-server-port-8443/#primaryimage" , "inLanguage" : "en-US" , "url" : "https://cdn.crunchify.com/wp-content/uploads/2020/04/Apache-tomcat-running-on-port-8443-over-HTTPS.png" , "width" : 1261 , "height" : 451 , "caption" : "Apache tomcat running on port 8443 over HTTPS" } , { "@type" : "WebPage" , "@id" : "https://crunchify.com/step-by-step-guide-to-enable-https-or-ssl-correct-way-on-apache-tomcat-server-port-8443/#webpage" , "url" : "https://crunchify.com/step-by-step-guide-to-enable-https-or-ssl-correct-way-on-apache-tomcat-server-port-8443/" , "name" : "Step by Step guide to Enable HTTPS or SSL correct way on Apache Tomcat Server - Port 8443 \u2022 Crunchify" , "isPartOf" : { "@id" : "https://crunchify.com/#website" } , "inLanguage" : "en-US" , "primaryImageOfPage" : { "@id" : "https://crunchify.com/step-by-step-guide-to-enable-https-or-ssl-correct-way-on-apache-tomcat-server-port-8443/#primaryimage" } , "datePublished" : "2020-04-24T06:08:30+00:00" , "dateModified" : "2020-04-24T17:44:01+00:00" , "author" : { "@id" : "https://crunchify.com/#/schema/person/b40f3806c0a1ef3372253a9198e0562f" } , "description" : "It's been almost 12 years I started using Apache Tomcat. I believe when I did my 1st under grade project, it was on Tomcat version 1.x. Now it's already" , "potentialAction" : [ { "@type" : "ReadAction" , "target" : [ "https://crunchify.com/step-by-step-guide-to-enable-https-or-ssl-correct-way-on-apache-tomcat-server-port-8443/" ] } ] } , { "@type" : [ "Person" ] , "@id" : "https://crunchify.com/#/schema/person/b40f3806c0a1ef3372253a9198e0562f" , "name" : "App Shah" , "image" : { "@type" : "ImageObject" , "@id" : "https://crunchify.com/#authorlogo" , "inLanguage" : "en-US" , "url" : "https://secure.gravatar.com/avatar/d8c1b220ca438566d5e5d0e70be7ef5e?s=96&d=mm&r=g" , "caption" : "App Shah" } , "description" : "I'm an Engineer by profession, Blogger by passion & Founder of Crunchify, LLC, the largest free blogging & technical resource site for beginners. Love SEO, SaaS, #webperf, WordPress, Java. With over <a href=\"https://crunchify.com/advertise/\" target=\"_blank\" rel=\"noopener noreferrer\">16 millions+</a> pageviews/month, Crunchify has changed the life of over thousands of individual around the globe teaching Java & Web Tech for FREE. Get latest update on <a target=\"_blank\" href=\"https://www.facebook.com/Crunchify\" class=\"crunchify-social-icon-facebook\" rel=\"noopener noreferrer\"><i class=\"fab fa-facebook\" style=\"margin: 0px 5px\"></i></a> and <a target=\"_blank\" href=\"https://twitter.com/Crunchify\" class=\"crunchify-social-icon-twitter\" rel=\"noopener noreferrer\"><i class=\"fab fa-twitter\" style=\"margin: 0px 0px 0px 5px;\"></i></a>.\r\n\r\n<div style=\"clear:both\"></div>" , "sameAs" : [ "https://facebook.com/Crunchify" , "https://twitter.com/Crunchify" ] } ] } |

ขั้นตอนที่ 2. ตรวจสอบ URL การค้นหาไซต์ลิงก์
ตรวจสอบให้แน่ใจว่าคุณระบุ correct Sitelinks search URL
บรรทัดที่ 10 ถึง 14 ถูกเน้นในโค้ดด้านบน กรุณาตรวจสอบอีกครั้ง
โดยค่าเริ่มต้น Yoast SEO จะเพิ่ม URL ด้านล่าง
-
"target": "https://crunchify.com/?s={search_term_string}"
Note:
หากคุณยังไม่ได้ตั้งค่า Google Custom Search คุณก็ไม่เป็นไร คุณไม่จำเป็นต้องปรับเปลี่ยนอะไร แต่ฉันขอแนะนำให้ใช้การตั้งค่าผลการค้นหาของ Google Custom Search ตามประสบการณ์ 6 ปีที่ผ่านมา ประสบการณ์ของผู้ใช้และคุณภาพของผลการค้นหานั้นดีกว่าการค้นหาโดย Google เริ่มต้นมาก
ขั้นตอนที่ 3 เปลี่ยน URL ค้นหาเป้าหมาย
ใน Crunchify เราใช้การตั้งค่า Google Custom Search และด้วยเหตุนี้ URL เป้าหมายเริ่มต้นจะไม่ทำงานสำหรับเรา
URL การค้นหาที่กำหนดเองของเราคือ:
-
https://crunchify.com/search/?q=java
จะเปลี่ยน URL ในมาร์กอัปสคีมาของ Yoast SEO ได้อย่างไร
เพิ่มข้อมูลโค้ดด้านล่างลงในไฟล์ functions.php ของธีมและบันทึกการเปลี่ยนแปลง
1 2 3 4 5 |
// Yoast - change ld+json search url function crunchify_change_json_ld_search_url ( ) { return trailingslashit ( home_url ( ) ) . 'search/?q={search_term_string}' ; } add_filter ( 'wpseo_json_ld_search_url' , 'crunchify_change_json_ld_search_url' ) ; |
ข้อมูลโค้ดนี้จะแทนที่และอัปเดต URL การค้นหาที่ถูกต้องสำหรับคุณ:
นี่คือ URL ที่อัปเดต:
-
"target": "https://crunchify.com/search/?q={search_term_string}"
ขั้นตอนที่ 4 รอสักสองสามสัปดาห์
ถึงเวลารอสองสามสัปดาห์แล้วตรวจสอบผลลัพธ์ในหน้าผลการค้นหาของ Google อีกครั้ง เช็คเอาต์ผลสด เราทำการเปลี่ยนแปลงเมื่อวันที่ 24 เมษายน 2020 และ Google เริ่มรับรู้การเปลี่ยนแปลง URL ทันทีหลังจากนั้น
นี่คือ URL: https://search.google.com/search-console/sitelinks-searchbox เลือกคุณสมบัติและคุณควรเห็นผลลัพธ์
นี่คือตัวอย่างผลการค้นหา Crunchify Sitelink
นี่คือรายละเอียดเพิ่มเติม:
สนใจเรียนรู้เพิ่มเติมเกี่ยวกับข้อมูลที่มีโครงสร้างไหม
ที่จะแทรกลงในหน้า?
JSON-LD?@JohnMu พูดถึง #AskGoogleWebmasters ของสัปดาห์นี้แล้ว!ตรวจสอบออก→ https://t.co/b7utqUQf0m pic.twitter.com/iYxgtZGRrr
— Google เว็บมาสเตอร์ (@googlewmc) 11 กันยายน 2019
หวังว่าบทช่วยสอนนี้จะช่วยคุณแก้ไขปัญหาที่คุณอาจมีสำหรับมาร์กอัปสคีมาของช่องค้นหา JSON-LD Google Sitelinks บล็อกที่มีความสุข