awesomemotive / all-in-one-seo-pack

All in One SEO plugin for WordPress SEO
https://aioseo.com
339 stars 155 forks source link

Add schema BreadcrumbList #3148

Closed EkoJR closed 4 years ago

EkoJR commented 4 years ago

Resolves #2813

Proposed changes

Adds breadcrumbs to the schema structured data.

Types of changes

What types of changes does your code introduce?

Checklist

Testing instructions

  1. Navigate frontend and check ld+/json data in a. Home/Main b. Post c. Child Page d. Taxonomy Term archive. e. Date archive. f. Author page. g. Search page.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

benjaminprojas commented 4 years ago

@EkoJR is there supposed to be a BreadcrumbList on the home page? I'm not seeing one there at all, which is okay if its not meant to show. I just see this:

...
"breadcrumb": {
    "@id": "https://aioseo.local#breadcrumblist"
},
...
EkoJR commented 4 years ago

@wpsmort @benjaminprojas The error should now be fixed on the Homepage.

EkoJR commented 4 years ago

@benjaminprojas Added a fix for handling $wp_query->is_posts_page instance/condition.

wpsmort commented 4 years ago

This is tested and is good.