<?php if(is_front_page() || is_404()){ } else {?>
<div class=”breadcrumb”>
<div class=”container”>
<div class=”row”>
<div class=”col-12″>
<?php echo custom_breadcrumbs($page_ID); ?>
</div>
</div>
</div>
</div>
<?php } ?>
<?php
// Breadcrumbs
function custom_breadcrumbs($postId) {
// Get the query & post information
$post = get_post($postId);
$GLOBALS[‘post’] = $post;
$brd_str = ”;
// Do not display on the homepage
if ( !is_front_page()) {
$brd_str .= ‘<ul class=”breadcrumbs-list”>’;
//Home page
//$brd_str .= ‘<li class=”breadcrumb-item”><a class=”breadcrumb-item bread-home” href=”‘ . esc_url( site_url() ) . ‘” title=”Home”>Home</a></li>’;
if ( is_author() ){ // Auhor archive
// Get the author information
global $author;
$userdata = get_userdata( $author );
$user_firstname=get_user_meta($author,’first_name’,true);
$user_lastname=get_user_meta($author,’last_name’,true);
// Display author name
$brd_str .= ‘<li class=”item-current breadcrumb-item active item-current-‘ . $userdata->user_nicename . ‘ current”>’ . ‘Author : ‘ . $user_firstname . ‘</li>’;
}
else if ( (is_archive() || is_tax(‘gallery’)) && !is_category() && !is_tag() ) {
/*if(is_tax()){
$custom_tax_name = get_queried_object()->name;
$brd_str .= ‘<li class=”item-current breadcrumb-item item-archive active current”>’ . $custom_tax_name . ‘</li>’;
}*/
if(is_archive() || is_tax()){
$custom_tax_name = get_queried_object()->name;
$brd_str .= ‘<li class=”item-current breadcrumb-item item-archive active current”>’ . ucfirst($custom_tax_name) . ‘</li>’;
}
} else if ( is_single() ) {
$post_id = get_the_ID();
$post_type = get_post_type($post_id);
$post_type_obj = get_post_type_object( get_post_type($post_id) );
$posttypename = $post_type_obj->label;
if($post_type==’news’){
$brd_str .= ‘<li class=”current active breadcrumb-item item-cat item-custom-post-type-‘ . $post_type . ‘”><a href=”‘.site_url().’/news” class=”breadcrumb-item bread-home”>’ . $posttypename . ‘</a></li>’;
$categories = get_the_terms($post_id,’news-type’);
if(!empty($categories)){
if(!empty($categories[0])){
$cat_name = $categories[0]->name;
$cat_link = get_term_link($categories[0]->term_id);
$brd_str .= ‘<li class=”breadcrumb-item”>’.$cat_name.'</li>’;
}
}
global $post;
if ( $post->post_parent ) {
//$brd_str .= ‘<li class=”breadcrumb-item”><a class=”breadcrumb-item bread-home” href=”‘ .get_the_permalink($post->post_parent). ‘” title=”‘.get_the_title($post->post_parent).'”>’ . get_the_title($post->post_parent) . ‘</a></li>’;
}
} elseif($post_type==’tribe_events’){
$brd_str .= ‘<li class=”current active breadcrumb-item item-cat item-custom-post-type-‘ . $post_type . ‘”><a href=”‘.site_url().’/events” class=”breadcrumb-item bread-home”>’ . $posttypename . ‘</a></li>’;
$categories = get_the_terms($post_id,’tribe_events_cat’);
if(!empty($categories)){
if(!empty($categories[0])){
$cat_name = $categories[0]->name;
$cat_link = get_term_link($categories[0]->term_id);
$brd_str .= ‘<li class=”breadcrumb-item”>’.$cat_name.'</li>’;
}
}
global $post;
if ( $post->post_parent ) {
//$brd_str .= ‘<li class=”breadcrumb-item”><a class=”breadcrumb-item bread-home” href=”‘ .get_the_permalink($post->post_parent). ‘” title=”‘.get_the_title($post->post_parent).'”>’ . get_the_title($post->post_parent) . ‘</a></li>’;
}
} elseif($post_type==’post’){
$categories = get_the_category($post_id,’news’);
if(!empty($categories)){
if(!empty($categories[0])){
$cat_name = $categories[0]->name;
$cat_link = get_term_link($categories[0]->term_id);
$brd_str .= ‘<li class=”breadcrumb-item”><a class=”breadcrumb-item bread-home” href=”‘ . site_url() . ‘/news/” title=”‘.$cat_name.'”>’.$cat_name.'</a></li>’;
}
}
global $post;
if ( $post->post_parent ) {
//$brd_str .= ‘<li class=”breadcrumb-item”><a class=”breadcrumb-item bread-home” href=”‘ .get_the_permalink($post->post_parent). ‘” title=”‘.get_the_title($post->post_parent).'”>’ . get_the_title($post->post_parent) . ‘</a></li>’;
}
}
//$brd_str .= ‘<li class=”current active breadcrumb-item item-cat item-custom-post-type-‘ . $post_type . ‘”>’ . get_the_title() . ‘</li>’;
} else if ( is_category() ) { // Category page
$brd_str .= ‘<li class=”item-current breadcrumb-item item-cat active current”>’ . single_cat_title(”, false) . ‘</li>’;
} else if ( is_search() ){ // Search results
if(empty(get_search_query())){
$brd_str .= ‘<li class=”item-current breadcrumb-item active item-current-‘ . get_search_query() . ‘ current”>Search Results for ‘.get_search_query().'</li>’;
}else{
$brd_str .= ‘<li class=”item-current breadcrumb-item active item-current-‘ . get_search_query() . ‘ current”>Search Results for “’.get_search_query().’”</li>’;
}
} elseif ( is_page() ) {
if( $post->post_parent ){ // Standard page
// If child page, get parents
$anc = get_post_ancestors( $post->ID );
// Get parents in the right order
$anc = array_reverse($anc);
// Parent page loop
foreach ( $anc as $ancestor ) {
$parents .= ‘<li class=”breadcrumb-item”><a class=”bread-parent breadcrumb-item bread-parent-‘ . $ancestor . ‘” href=”‘ . get_permalink($ancestor) . ‘” title=”‘ . get_the_title($ancestor) . ‘”>’ . get_the_title($ancestor) . ‘</a></li>’;
}
$brd_str .= $parents;
$brd_str .= ‘<li class=”item-current active breadcrumb-item item-‘ . $post->ID . ‘ current”>’ . get_the_title() . ‘</li>’;
} else {
$brd_str .= ‘<li class=”item-current active breadcrumb-item item-‘ . $post->ID . ‘ current”>’ . get_the_title() . ‘</li>’;
}
} else if ( is_tag() ){
$term_id = get_query_var(‘tag_id’);
$taxonomy = ‘post_tag’;
$args = ‘include=’ . $term_id;
$terms = get_terms( $taxonomy, $args );
$get_term_id = $terms[0]->term_id;
$get_term_slug = $terms[0]->slug;
$get_term_name = $terms[0]->name;
// Display the tag name
$brd_str .= ‘<li class=”item-current active breadcrumb-item item-tag-‘ . $get_term_id . ‘ item-tag-‘ . $get_term_slug . ‘ current”>’ . $get_term_name . ‘</li>’;
} elseif ( is_day() ){ // Day archive
// Year link
$brd_str .= ‘<li class=”item-year breadcrumb-item item-year-‘ . get_the_time(‘Y’) . ‘”><a class=”bread-year bread-year-‘ . get_the_time(‘Y’) . ‘” href=”‘ . get_year_link( get_the_time(‘Y’) ) . ‘” title=”‘ . get_the_time(‘Y’) . ‘”>’ . get_the_time(‘Y’) . ‘ Archives</a></li>’;
// Month link
$brd_str .= ‘<li class=”item-month breadcrumb-item item-month-‘ . get_the_time(‘m’) . ‘”><a class=”bread-month bread-month-‘ . get_the_time(‘m’) . ‘” href=”‘ . get_month_link( get_the_time(‘Y’), get_the_time(‘m’) ) . ‘” title=”‘ . get_the_time(‘M’) . ‘”>’ . get_the_time(‘M’) . ‘ Archives</a></li>’;
// Day display
$brd_str .= ‘<li class=”item-current active breadcrumb-item item-‘ . get_the_time(‘j’) . ‘ current”>’ . get_the_time(‘jS’) . ‘ ‘ . get_the_time(‘M’) . ‘ Archives</li>’;
} else if ( is_month() ){ // Month Archive
// Year link
$brd_str .= ‘<li class=”item-year breadcrumb-item item-year-‘ . get_the_time(‘Y’) . ‘”><a class=”bread-year bread-year-‘ . get_the_time(‘Y’) . ‘” href=”‘ . get_year_link( get_the_time(‘Y’) ) . ‘” title=”‘ . get_the_time(‘Y’) . ‘”>’ . get_the_time(‘Y’) . ‘ Archives</a></li>’;
//$brd_str .= ‘<li class=”separator separator-‘ . get_the_time(‘Y’) . ‘”> ‘ . $separator . ‘ </li>’;
// Month display
$brd_str .= ‘<li class=”item-month breadcrumb-item item-month-‘ . get_the_time(‘m’) . ‘”>’ . get_the_time(‘M’) . ‘ Archives</li>’;
} else if ( is_year() ){ // Year archive
$brd_str .= ‘<li class=”item-current active breadcrumb-item item-current-‘ . get_the_time(‘Y’) . ‘ current”>’ . get_the_time(‘Y’) . ‘ Archives</li>’;
} /* elseif ( get_query_var(‘paged’) ){ // Paginated archives
$brd_str .= ‘<li class=”item-current breadcrumb-item item-current-‘ . get_query_var(‘paged’) . ‘ current”>’.__(‘Page’) . ‘ ‘ . get_query_var(‘paged’) . ‘</li>’;
} */ elseif ( is_404() ){ // 404 page
$brd_str .= ‘<li class=”current active”>’ . ‘Error 404’ . ‘</li>’;
} else{
$brd_str .= ‘<li class=”item-current active breadcrumb-item item-40 current”>’. get_the_title( get_option( ‘page_for_posts’ )) .'</li>’;
}
$brd_str .= ‘</ul>’;
}
return $brd_str;
}
function custom_languagee_url($code) {
if ( !is_front_page()) {
if(is_product_category()){
$term_id = get_queried_object()->term_id;
$id = icl_object_id($term_id, ‘product_cat’, false, $code );
$permalink = get_term_link( $id );
} elseif(is_page()){
$page_id = get_the_ID();
$id = icl_object_id($page_id, ‘page’, false, $code );
$permalink = get_the_permalink( $id );
} elseif(is_tax( ‘element’ )){
$term_id = get_queried_object()->term_id;
$id = icl_object_id($term_id, ‘product_cat’, false, $code );
$permalink = get_term_link( $id );
} elseif ( is_home() ) {
$page_id = get_option( ‘page_for_posts’ );
$id = icl_object_id($page_id, ‘page’, false, $code );
$permalink = get_the_permalink( $id );
} elseif ( is_single() ) {
$page_id = get_the_ID();
$id = icl_object_id($page_id, ‘post’, false, $code );
$permalink = get_the_permalink( $id );
} elseif ( is_product() ) {
$page_id = get_the_ID();
$id = icl_object_id($page_id, ‘product’, false, $code );
$permalink = get_the_permalink( $id );
} else{
$permalink = apply_filters( ‘wpml_permalink’, site_url() , $code );
}
}else{
$permalink = apply_filters( ‘wpml_permalink’, site_url() , $code );
}
return $permalink;
}
hi!,I like your writing very so much! percentage we keep in touch extra approximately your article on AOL? I require a specialist in this area to resolve my problem. May be that is you! Taking a look forward to look you.
Worpdress breadcrumbs – PHPCODE
amlckpffxsc
[url=http://www.go1647z1pz6c13f88gklmzr2r2h0911os.org/]umlckpffxsc[/url]
mlckpffxsc http://www.go1647z1pz6c13f88gklmzr2r2h0911os.org/
PLEASE F0RWARD THiS EMAiL To SoME0NE iN YoUR CoMPANY WHo iS ALL0WED T0 MAKE IMPORTANT DECiSioNS!
We have hacked your website https://phpcodeinformation.com and extracted your databases.
How did this happen?
our team has f0und a vulnerability within your site that we were able t0 exploit. After finding the vulnerability we were able t0 get y0ur database credentials and extract your entire database and move the informati0n t0 an 0ffshore server.
What does this mean?
We will systematically go through a series of steps of t0tally damaging y0ur reputation. First your database will be leaked or s0ld t0 the highest bidder which they will use with whatever their intentions are. Next if there are e-mails found they will be e-mailed that their information has been sold or leaked and your site https://phpcodeinformation.com was at fault thusly damaging your reputation and having angry cust0mers/ass0ciates with whatever angry customers/associates d0. Lastly any links that y0u have indexed in the search engines will be de-indexed based 0ff 0f blackhat techniques that we used in the past t0 de-index 0ur targets.
H0w d0 i stop this?
We are willing to refrain fr0m destr0ying your site’s reputation f0r a small fee. The current fee is $3000 in bitcoins (.16 BTC).
Please send the bitcoin t0 the f0llowing Bitcoin address (Make sure to copy and paste):
37jF6k83XdPgcbA15ruytGTqPngRdSqUBg
once you have paid we will aut0matically get inf0rmed that it was your payment. Please note that you have to make payment within 5 days after receiving this e-mail or the database leak, e-mails dispatched, and de-index of your site WiLL start!
How d0 i get Bitcoins?
Y0u can easily buy bitcoins via several websites or even 0ffline fr0m a Bitcoin-ATM.
What if i d0n’t pay?
if you decide n0t t0 pay, we will start the attack at the indicated date and uphold it until y0u d0, there’s n0 counter measure to this, y0u will only end up wasting more money trying t0 find a solution. We will completely destr0y your reputation am0ngst g00gle and your customers.
This is n0t a h0ax, d0 not reply to this email, d0n’t try t0 reason 0r negotiate, we will n0t read any replies. 0nce y0u have paid we will stop what we were d0ing and you will never hear fr0m us again!
Please note that Bitcoin is anonym0us and no 0ne will find out that y0u have complied.
I’m extremely impressed with your writing skills and also with the structure in your weblog. Is that this a paid topic or did you customize it your self? Anyway stay up the excellent quality writing, it’s rare to see a great blog like this one today..
Simply wanna comment on few general things, The website design and style is perfect, the subject matter is very wonderful. “To establish oneself in the world, one has to do all one can to appear established.” by Francois de La Rochefoucauld.
Thanx for the effort, keep up the good work Great work, I am going to start a small Blog Engine course work using your site I hope you enjoy blogging with the popular BlogEngine.net.Thethoughts you express are really awesome. Hope you will right some more posts.
It?¦s actually a great and helpful piece of info. I?¦m glad that you shared this helpful info with us. Please keep us up to date like this. Thank you for sharing.
I view something truly special in this internet site.
I am impressed with this website , really I am a fan.
Today, I went to the beachfront with my children. I found a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is completely off topic but I had to tell someone!
I like what you guys are up too. Such clever work and reporting! Keep up the superb works guys I¦ve incorporated you guys to my blogroll. I think it’ll improve the value of my web site 🙂
Thanks for some other great article. Where else may anyone get that kind of info in such a perfect manner of writing? I’ve a presentation subsequent week, and I’m on the look for such information.
I need to to thank you for this very good read!! I certainly loved every little bit of it. I have you book-marked to check out new things you postÖ