Hello,
We apologize for the issues you are facing with the schema implementation on your pages. Thank you for sharing the details and the images regarding the Collection Page schema and the discrepancies with the og:type
.
1. Collection Page Schema
It seems that you have implemented the Collection Page schema correctly, but it is not displaying as expected. To ensure that the schema is set up properly, please double-check the following:
- Make sure that the
@id
and url
fields are correctly pointing to the intended page.
- Verify that the
thumbnailUrl
is set to a valid image URL that is accessible.
If you want to compare your implementation with the one on the example page you provided, you can use the Google Rich Results Testing Tool to validate your schema and see if there are any errors or warnings.
2. Discrepancies with og:type
Regarding the differences in og:type
, this could be due to how the schema is being generated or conflicts with other plugins or themes. To troubleshoot this:
- Check if there are any other SEO plugins that might be conflicting with Rank Math.
- Ensure that you have set the correct
og:type
in the Rank Math settings for each page. You can do this by navigating to Rank Math SEO → Titles & Meta in your WordPress dashboard.
If these suggestions do not resolve your issues, please reply to this ticket, and a human agent from our support team will take over and assist you further. We appreciate your patience as we work to resolve this for you!
Hello,
Thank you for contacting us and bringing your concern to our attention.
1. If you want to use the same CollectionPage schema structure as that page, you can use the following filter on your website:
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
global $post;
$imageThumb = RankMath\Helper::get_settings( 'titles.open_graph_image' );
if ( $post->ID == 1357 ) {
$data['CollectionPage'] = [
'@type' => 'CollectionPage',
'@id' => get_the_permalink( $post->ID ) . '#webpage',
'url' => get_the_permalink( $post->ID ),
'name' => get_the_title( $post->ID ),
'isPartOf' => [
'@id' => site_url( '#website' ),
],
'primaryImageOfPage' => [
'@id' => get_the_permalink( $post->ID ) . '#primaryimage',
],
'image' => [
'@id' => get_the_permalink( $post->ID ) . '#primaryimage',
],
'thumbnailUrl' => $imageThumb, // Or use another preferred image
'description' => get_the_excerpt( $post->ID ),
'inLanguage' => 'en-US',
];
}
return $data;
}, 99, 2 );
2. Please note that the og:type
is not related to your schema. However, if you want to change the og:type
of your website, you can use the following filter code on your website:
add_filter( "rank_math/opengraph/facebook/og_type", function( $content ) {
$content = 'website';
return $content;
});
For more details on the og:type
meta tag, you can check this URL: https://rankmath.com/kb/open-graph-meta-tags/#og-type
Hope that helps and please don’t hesitate to let us know if you have any other questions.
Thank you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.