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); |
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
/* Disable Admin Bar for all users ***************************************************************** | |
** http://www.onextrapixel.com/2012/02/24/taking-control-of-wordpress-3-0-admin-bar/ ************ */ | |
/* !일반회원 어드민 바 제거 ************************************************************************** */ | |
if ( current_user_can('subscriber') ) { | |
show_admin_bar(false); | |
} |
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
/* Sets the user's display name (always) to first name last name, when it's available ************************************** | |
** http://stackoverflow.com/questions/9326315/wordpress-change-default-display-name-publicy-as-for-all-existing-users *** */ | |
/* !아이디 대신 이름으로 나타내기 ********************************************************************************************* */ | |
/* Sets the user's display name (always) to first name last name, when it's avail. */ | |
add_action ('admin_head','make_display_name_f_name_last_name'); | |
function make_display_name_f_name_last_name(){ | |
$users = get_users(array('fields'=>'all')); | |
foreach($users as $user){ | |
$user = get_userdata($user->ID); | |
$display_name = $user->first_name; |
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
/* ******************************************************************************************************** | |
** Google Maps Shortcode ******************************************************************************* */ | |
/* !구글맵 shortcode ************************************************************************************ */ | |
function fn_googleMaps($atts, $content = null) { | |
extract(shortcode_atts(array( | |
"width" => '598', | |
"height" => '420', | |
"src" => '' | |
), $atts)); | |
return '<iframe width="'.$width.'" height="'.$height.'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'.$src.'&output=embed"></iframe>'; |
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
/* Admin Page Fivicon ****************************************************************************** | |
** http://wp.tutsplus.com/tutorials/creative-coding/using-conditional-tags-to-supercharge-your-blog/ | |
** 관리자 페이지 파비콘 적용 ************************************************************************* */ | |
function admin_favicon() { | |
if(is_admin()) { | |
echo '<link rel="shortcut icon" href="'.get_bloginfo('url').'/favicon.png" />'; | |
} | |
} | |
add_action('admin_head','admin_favicon'); |
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
/* ************************************************************************************* | |
** Dashboard Modification *********************************************************** */ | |
/* !로그인/회원가입 대시보드 수정 ******************************************************* */ | |
/* to change the logo */ | |
function my_login_logo() { ?> | |
<style type="text/css"> | |
body.login { background-color: #f9f9f9; height: auto !important; } | |
body.login div#login { padding-top: 55px !important; } | |
body.login div#login h1 { position: relative; } |
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
/* Remove 'website' field for comment form ***************************************************************** | |
** http://techhacking.com/2011/02/04/wordpress-how-to-remove-the-website-field-from-the-comment-form/ ** **/ | |
/* !댓글폼에서 웹싸이트 필드 제거 ***************************************************************************** */ | |
add_filter('comment_form_default_fields', 'url_filtered'); | |
function url_filtered($fields) { | |
if(isset($fields['url'])) | |
unset($fields['url']); | |
return $fields; | |
} |
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
/* Child Page with Shorcode *********************************************************************************** | |
** http://wp.tutsplus.com/tutorials/quick-tip-display-excerpts-of-child-pages-with-a-shortcode/ *************** | |
** http://botcrawl.com/how-to-change-or-remove-the-howdy-greeting-message-on-the-wordpress-user-menu-bar/ ** */ | |
/* !차일드 페이지 코드 ***************************************************************************************** */ | |
function subpage_peek() { | |
global $post; | |
//query subpages | |
$args = array( | |
'post_parent' => $post->ID, | |
'order' => 'ASC', |
NewerOlder