Skip to content

Instantly share code, notes, and snippets.

@jocastaneda
Created July 1, 2017 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jocastaneda/bcad6c10b8f8e0c05cdf26b900992e44 to your computer and use it in GitHub Desktop.
Save jocastaneda/bcad6c10b8f8e0c05cdf26b900992e44 to your computer and use it in GitHub Desktop.
<?php
function lametheme_get_breadcrumbs() {
/* === OPTIONS === */
$text['home'] = esc_html__( 'Home', 'lametheme' ); // text for the 'Home' link
$text['blog'] = esc_html__( 'Blog', 'lametheme' ); // text for the 'Blog' link
$text['category'] = esc_html__( 'Archive by Category "%s"', 'lametheme' ); // text for a category page
$text['search'] = esc_html__( 'Search Results for "%s" Query', 'lametheme' ); // text for a search results page
$text['tag'] = esc_html__( 'Posts Tagged "%s"', 'lametheme' ); // text for a tag page
$text['author'] = esc_html__( 'Articles Posted by %s', 'lametheme' ); // text for an author page
$text['404'] = esc_html__( 'Error 404', 'lametheme' ); // text for the 404 page
$show_current = 1; // 1 - show current post/page/category title in breadcrumbs, 0 - don't show
$show_on_home = 1; // 1 - show breadcrumbs on the homepage, 0 - don't show
$show_home_link = 1; // 1 - show the 'Home' link, 0 - don't show
$show_blog_link = 1; // 1 - show the 'Blog' link, 0 - don't show
$show_title = 1; // 1 - show the title for the links, 0 - don't show
$delimiter = esc_html( '/' ); // delimiter between crumbs
$before = '<li class="active">'; // tag before the current crumb
$after = '</li>'; // tag after the current crumb
/* === END OF OPTIONS === */
// there is no filter, no input options? WTF???
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment