I used get_ld_json_website()
and get_ld_json_links()
in the project, but it has been removed after v5. What methods can I use in place, and where can I find better documentation about it since
was dropped from the plugin?The_SEO_Framework\Generate_LDJson
I received an error from the Google Search console about “first level boolean not valid” for both pages on my website that use Modula Gallery.
That’s what is visible on the code of the page related to the error
<script type="application/ld+json">
[
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false
] </script>
How can I fix it?
]]>Google Search Console does not find the logo on my website. On Yoast, everything is setup under Yoast > Settings > Site representation. I selected “entity” and added a logo.
While checking at the code generated by Yoast (below) in Google Rich Results, the logo is not detected.
Could you kindly help ?
Best,
Tom
{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://lesboxeursdudimanche.com/","url":"https://lesboxeursdudimanche.com/","name":"Les Boxeurs du Dimanche - Média Boxe et MMA","isPartOf":{"@id":"https://lesboxeursdudimanche.com/#website"},"about":{"@id":"https://lesboxeursdudimanche.com/#organization"},"primaryImageOfPage":{"@id":"https://lesboxeursdudimanche.com/#primaryimage"},"image":{"@id":"https://lesboxeursdudimanche.com/#primaryimage"},"thumbnailUrl":"https://lesboxeursdudimanche.com/wp-content/uploads/2023/07/Ad-Trouve-ton-club-v2-2.webp","datePublished":"2023-05-26T15:54:38+00:00","dateModified":"2023-08-21T21:38:20+00:00","description":"Les Boxeurs du Dimanche - vivez la Boxe Anglaise et le MMA comme jamais auparavant. Découvrez les actualités et les analyses détaillées.","breadcrumb":{"@id":"https://lesboxeursdudimanche.com/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https://lesboxeursdudimanche.com/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https://lesboxeursdudimanche.com/#primaryimage","url":"https://lesboxeursdudimanche.com/wp-content/uploads/2023/07/Ad-Trouve-ton-club-v2-2.webp","contentUrl":"https://lesboxeursdudimanche.com/wp-content/uploads/2023/07/Ad-Trouve-ton-club-v2-2.webp","width":325,"height":275},{"@type":"BreadcrumbList","@id":"https://lesboxeursdudimanche.com/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil"}]},{"@type":"WebSite","@id":"https://lesboxeursdudimanche.com/#website","url":"https://lesboxeursdudimanche.com/","name":"Les Boxeurs du Dimanche","description":"Boxe anglaise et MMA : Les Boxeurs du Dimanche, votre source ultime d'actualités et d'analyses.","publisher":{"@id":"https://lesboxeursdudimanche.com/#organization"},"alternateName":"Les Boxeurs du Dimanche","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://lesboxeursdudimanche.com/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https://lesboxeursdudimanche.com/#organization","name":"Les Boxeurs du Dimanche","url":"https://lesboxeursdudimanche.com/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https://lesboxeursdudimanche.com/#/schema/logo/image/","url":"https://lesboxeursdudimanche.com/wp-content/uploads/2023/08/Les-Boxeurs-du-Dimanche.png","contentUrl":"https://lesboxeursdudimanche.com/wp-content/uploads/2023/08/Les-Boxeurs-du-Dimanche.png","width":1000,"height":1000,"caption":"Les Boxeurs du Dimanche"},"image":{"@id":"https://lesboxeursdudimanche.com/#/schema/logo/image/"},"sameAs":["https://www.instagram.com/lesboxeursdudimanche/","https://www.youtube.com/channel/UCQM9vcUVuleJscd5WaojkdA","https://www.tiktok.com/@lesboxeurs"]}]}
]]>I’ve managed to fix that, but one thing I have remaining is to replace the application/ld+json that is outputted in the Yoast schema graph. Is it possible to fetch the schema markup for a post?
]]>Example FAQ Code:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [{
"@type": "Question",
"name": "questiontexthere",
"acceptedAnswer": {
"@type": "Answer",
"text": "answertexthere"
}
}, {
"@type": "Question",
"name": "questiontexthere",
"acceptedAnswer": {
"@type": "Answer",
"text": "answertexthere"
}
}, {
"@type": "Question",
"name": "questiontexthere",
"acceptedAnswer": {
"@type": "Answer",
"text": "answertexthere"
}
}, {
"@type": "Question",
"name": "questiontexthere",
"acceptedAnswer": {
"@type": "Answer",
"text": "answertexthere"
}
}, {
"@type": "Question",
"name": "questiontexthere",
"acceptedAnswer": {
"@type": "Answer",
"text":"answertexthere"}
}]
}
</script>
Awesome plugin by the way! The Pro Version is totally worth it for anyone wondering!
]]>add_filter( 'wpseo_breadcrumb_single_link', 'wpseo_remove_breadcrumb_link', 10 ,2);
function wpseo_remove_breadcrumb_link( $link_output , $links ){
$page_src = $links['url'];
$last_word = basename( $page_src );
$text_to_remove = 'sklep';
if( $last_word == $text_to_remove ) {
$link_output = '';
}
return $link_output;
}
This removes the link from HTML, but does not remove it from ld+json.
As with “@type”: “BreadcrumbList”, Remove:
{
"@type": "ListItem",
"position": 2,
"item": {
"@type": "WebPage",
"@id": "https://localhost/test/sklep/",
"url": "https://localhost/test/sklep/",
"name": "Sklep"
}
},
Anyone can help?
]]>I really like the control we get over creating the desired Rich Snippet output by ourselves.
Since we use shortcode in our titles, the Rich Snippet will show the [shortcode] instead of the text behind?
Therefore:
Any ideas what “add_filter( ‘?????’, ‘do_shortcode’ );” we need to add in order to activate shortcodes for the plugin?
]]><script type="application/ld+json">[{"@context":"https:\/\/schema.org\/","@type":"Product"}]</script>
thanks.
]]>do_action( ‘amp_post_template_head’, $this );
Is there a way to disable the LD+JSON outpout in this function? I’m not sure how to remove this hook:
add_action( ‘amp_post_template_head’, ‘amp_post_template_add_schemaorg_metadata’ );
Thanks!
Hubert
I recently stumbled across a really nice restaurant in Indonesia and decided to make the family a free website. Unfortunately, I’m not a web designer / programmer and it’s been a bit of a struggle.
There is a restaurant on the island of Bali that keeps on popping up at the top in search results when googling for ‘my’ restaurant, but the name is actually spelt differently and it is located quite far away from the town of Ubud…
To enhance ‘my’ website’s SEO performance, I added some structured data in the footer of the webpages. The structured data testing tool thinks everything is fine and the Google webmaster console pics up 23 items. However, uploading this data does not appear to have made any difference to the search result ranking. Also, none of that additional info is being showcased anywhere in conjunction with the restaurant.
Would be great if someone out there could take a quick look at the data I added to see whether I’ve made any mistakes – many many thanks in advance!
The structured data that I included on my website is:
<script type=”application/ld+json”> {
“@context” : “https://schema.org”,
“@type” : “Restaurant”,
“address” : {
“@type”: “PostalAddress”,
“addressLocality”: “Ubud”,
“addressRegion”: “Kabupaten Gianyar”,
“addressCountry”: “ID”,
“postalCode”: “80571”,
“streetAddress”: “Jalan Sandat 8” },
“name”: “Warung Krisna”,
“url”: “https://krisna.online/”,
“telephone”: “+6281237168883”,
“openingHours”: “Mo-Su 10:00-22:00”,
“aggregateRating”:{
“@type”:”AggregateRating”,
“ratingValue”:”5″,
“reviewCount”:”22″},
“priceRange”:”1″,
“servesCuisine”: [“Indonesian, Balinese”],
“acceptsReservations”:”false”,
“menu”:”https://krisna.online/menu/”,
“paymentAccepted”:”Cash only”,
“description”: “Our family run restaurant takes pride in offering authentic Indonesian dishes, using fresh produce and prepared with lots of love.”,
“logo”:”https://krisna.online/wp-content/uploads/2017/10/WK-logo-for-Google-3.png”,
“image”:”https://krisna.online/wp-content/uploads/2017/10/WK-logo-for-Google-3.png”,
“sameAs” : [ “https://www.facebook.com/warung.krisna.9”,
“https://www.instagram.com/warung_krisna/”,
“https://www.tripadvisor.com/Restaurant_Review-g297701-d12951793-Reviews-Warung_Krisna-Ubud_Bali.html”,
“https://4sq.com/2x6lXCA”,
“https://www.zomato.com/bali/warung-krisna-ubud/info”],
“geo”: {
“@type”: “GeoCoordinates”,
“latitude”: “-8.50752739”,
“longitude”: “115.26642065”
}
} </script>