You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the prototyped version of the block ( #1 ) I implemented a call to yoast_breadcrumb() if it was available.
When the Breadcrumbs setting was Disabled then the function returned null, so the code then defaulted to my own logic.
When the Breadcrumbs setting was Enabled then the breadcrumb was displayed.
But, the results in the editor didn't match the results in the browser.
In the editor I just get "Home"
In the front-end the trail includes archive links for CPTs.
When the block is being rendered with Server Side Rendering, i.e. when it's a REST_REQUEST, then we won't call the WordPress SEO logic. We just use the default function sb_breadcrumbs_block_dynamic_block_internal()
The block will look slightly different from the front end since it won't be picking up the user defined / default values for "Home" and the separator. Perhaps we should make these block settings.
bobbingwide
changed the title
Improve Breadcrumb block using WordPress SEO logic
Improve Breadcrumbs block using WordPress SEO logic
Jul 30, 2020
In the prototyped version of the block ( #1 ) I implemented a call to
yoast_breadcrumb()
if it was available.When the Breadcrumbs setting was Disabled then the function returned null, so the code then defaulted to my own logic.
When the Breadcrumbs setting was Enabled then the breadcrumb was displayed.
But, the results in the editor didn't match the results in the browser.
In the editor I just get "Home"
In the front-end the trail includes archive links for CPTs.
e.g. when viewing
https://s.b/oikcom/block/breadcrumbs-block-sb-breadcrumbs-block/
the trail is:
'Ome » Blocks » Breadcrumbs block – sb/breadcrumbs-block
where:
Requirement
To get the same output in the editor as in the front-end.
Proposed solution
Don't know yet, but see if there's anything happening in... Yoast/wordpress-seo#14204
The text was updated successfully, but these errors were encountered: