Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Breadcrumbs by using Genesis breadcrumbs logic if available #3

Closed
bobbingwide opened this issue Jul 30, 2020 · 2 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@bobbingwide
Copy link
Owner

For themes which use the Genesis theme framework we can try to use the genesis breadcrumbs logic.

@bobbingwide bobbingwide added the enhancement New feature or request label Jul 30, 2020
@bobbingwide bobbingwide self-assigned this Jul 30, 2020
@bobbingwide
Copy link
Owner Author

bobbingwide commented Jul 30, 2020

I had a quick look at this. For the front-end the Genesis_Breadcrumb class has the logic we need. e.g.

if ( !$html ) {
		if ( class_exists( 'Genesis_Breadcrumb') ) {
			$gb = new Genesis_Breadcrumb();
			$html = $gb->get_output( [ 'labels' => [ 'prefix' => null] ]  );
		}
	}

BUT

Temporary fix

I hacked build_crumbs() code to add an else statment that assumes we're dealing with page crumb.

} else {
   $crumbs[] = $this->get_page_crumb();
}

Pragmatic solution

Don't do anything with Genesis_Breadcrumbs at present.

@bobbingwide bobbingwide changed the title Improve Breadcrumb by using Genesis breadcrumbs logic if available Improve Breadcrumbs by using Genesis breadcrumbs logic if available Jul 30, 2020
@bobbingwide
Copy link
Owner Author

Ignoring the comment above since I no longer understand it. I'm closing this issue as there is support for Genesis breadcrumbs ( front end only), since v0.5.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant