Created
November 26, 2012 06:48
-
-
Save tobedoit/4146911 to your computer and use it in GitHub Desktop.
Wordpress: breadcrumb for pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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">»</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