/ Published in: PHP
<?php>
Expand |
Embed | Plain Text
function breadcrumbs() { $delimiter = '»'; $name = 'FÅ‘oldal'; $currentBefore = '<span class="current">'; $currentAfter = '</span>'; global $post; $home = get_bloginfo('url'); if(is_home() && get_query_var('paged') == 0) else if ( is_category() ) { global $wp_query; $cat_obj = $wp_query->get_queried_object(); $thisCat = $cat_obj->term_id; $thisCat = get_category($thisCat); $parentCat = get_category($thisCat->parent); echo $currentBefore; single_cat_title(); echo $currentAfter; } elseif ( is_day() ) { echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' '; echo '<a href="' . get_month_link(get_the_time('Y'),get_the_time('m')) . '">' . get_the_time('F') . '</a> ' . $delimiter . ' '; } elseif ( is_month() ) { echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' '; } elseif ( is_year() ) { } elseif ( is_single() ) { $cat = get_the_category(); $cat = $cat[0]; echo $currentBefore; the_title(); echo $currentAfter; } elseif ( is_page() && !$post->post_parent ) { echo $currentBefore; the_title(); echo $currentAfter; } elseif ( is_page() && $post->post_parent ) { $parent_id = $post->post_parent; while ($parent_id) { $page = get_page($parent_id); $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>'; $parent_id = $page->post_parent; } echo $currentBefore; the_title(); echo $currentAfter; } elseif ( is_search() ) { } elseif ( is_tag() ) { echo $currentBefore; single_tag_title(); echo $currentAfter; } elseif ( is_author() ) { global $author; $userdata = get_userdata($author); } elseif ( is_404() ) { } if ( get_query_var('paged') ) }
You need to login to post a comment.
