nextjs-wordpress-starter icon indicating copy to clipboard operation
nextjs-wordpress-starter copied to clipboard

archiveSeo on custom taxonomie archives.

Open koraysels opened this issue 3 years ago • 4 comments

Hi,

when I look in GraphiQL explorer to get an archive of a custom taxonomy for a custom post type, I cannot read the field 'archiveSeo' is that supposed to be enabled in some way for it to work? or...

koraysels avatar Jan 20 '22 10:01 koraysels

image

koraysels avatar Jan 20 '22 10:01 koraysels

@koraysels archiveSeo is added via wds-headless-seo (which builds on Yoast SEO): https://github.com/WebDevStudios/wds-headless-seo/blob/main/inc/wp-graphql.php. That field should be added automatically to all post types with has_archive set to true.

ravewebdev avatar Jan 20 '22 17:01 ravewebdev

Yes but in taxonomy archive too?

🙏

On 20 Jan 2022, at 18:24, R A Van Epps @.***> wrote:

 @koraysels archiveSeo is added via wds-headless-seo (which builds on Yoast SEO): https://github.com/WebDevStudios/wds-headless-seo/blob/main/inc/wp-graphql.php. That field should be added automatically to all post types with has_archive set to true.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

koraysels avatar Jan 21 '22 06:01 koraysels

@koraysels in our projects, I believe we're using the default seo field provided by Yoast SEO for built-in taxonomy archives. I don't have an example to reference for SEO in a custom taxonomy archive, but I would recommend either trying the seo field provided by Yoast SEO or extending our custom archiveSeo handling to apply to your custom taxonomy, depending on what data you need.

ravewebdev avatar Jan 21 '22 22:01 ravewebdev