We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey @justintadlock
Thanks for your great work! However, I am encountering an issue when trying to print the array/objects to the front-end.
Following code is returning an empty array/object:
use Hybrid\Breadcrumbs\Trail; $tax = [ 'post' => 'category' ]; $labels = [ 'title' => __( 'Browse:', 'hybrid-core' ), 'aria_label' => _x( 'Breadcrumbs', 'breadcrumbs aria label', 'hybrid-core' ), 'home' => __( 'Home', 'hybrid-core' ), 'error_404' => __( '404 Not Found', 'hybrid-core' ), 'archives' => __( 'Archives', 'hybrid-core' ), 'search' => __( 'Search results for: %s', 'hybrid-core' ), 'paged' => __( 'Page %s', 'hybrid-core' ), 'paged_comments' => __( 'Comment Page %s', 'hybrid-core' ), 'archive_minute' => __( 'Minute %s', 'hybrid-core' ), 'archive_week' => __( 'Week %s', 'hybrid-core' ), 'archive_minute_hour' => '%s', 'archive_hour' => '%s', 'archive_day' => '%s', 'archive_month' => '%s', 'archive_year' => '%s', ]; $defaults = [ 'labels' => $labels, 'post_taxonomy' => $tax, 'show_on_front' => true, 'show_trail_end' => true, 'network' => true, 'before' => 'test', 'after' => 'test', 'container_tag' => 'nav', 'title_tag' => 'h2', 'list_tag' => 'ul', 'item_tag' => 'li', 'container_class' => 'breadcrumbs', 'title_class' => 'breadcrumbs__title', 'list_class' => 'breadcrumbs__trail', 'item_class' => 'breadcrumbs__crumb' ]; echo json_encode( Trail::make( $defaults ) ); echo json_encode( Trail::all( $defaults ) );
Am I missing something here? Trail::render works without problems.
Thanks! Dennis
The text was updated successfully, but these errors were encountered:
@dnnsjsk Did you try Trail::display();?
Trail::display();
Sorry, something went wrong.
@ernilambar That works as well, but I need the breadcrumb data as an Array/Object and not rendered already.
@dnnsjsk Hybrid\Breadcrumbs\Trail::all() gives all breadcrumb items.
Hybrid\Breadcrumbs\Trail::all()
No branches or pull requests
Hey @justintadlock
Thanks for your great work! However, I am encountering an issue when trying to print the array/objects to the front-end.
Following code is returning an empty array/object:
Am I missing something here? Trail::render works without problems.
Thanks!
Dennis
The text was updated successfully, but these errors were encountered: