Skip to content

Instantly share code, notes, and snippets.

@tobedoit
Created November 26, 2012 06:48
Show Gist options
  • Save tobedoit/4146911 to your computer and use it in GitHub Desktop.
Save tobedoit/4146911 to your computer and use it in GitHub Desktop.
Wordpress: breadcrumb for pages
/* breadcrumb function for pages *************************************************************
** http://rainmakerwebdesign.com/uncategorized/wordpress-breadcrumb-function-for-pages/ *** */
/* !부모 페이지 표시 ************************************************************************* */
function rm_bread_crumbs() {
global $post;
//if the page has a parent add title and link of parent
if($post->post_parent) {
$crumbs = '<a href="'.get_permalink($post->post_parent).'">'.get_the_title($post->post_parent).'</a>'.'<span class="raquo">&raquo;</span> ';
}
$crumbs .= get_the_title($post->ID);
echo $crumbs;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment