This file contains hidden or 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
| <a href="<?php echo get_permalink( get_page_by_path( 'about/skills' ) ) ?>">Skills</a |
This file contains hidden or 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
| <a href="<?php echo get_post_type_archive_link ( 'your_post_type' ) ?>"</a> |
This file contains hidden or 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
| // Returns true if user has specific role | |
| function {your_prefix}_check_user_role( $role, $user_id = null ) { | |
| if ( is_numeric( $user_id ) ) | |
| $user = get_userdata( $user_id ); | |
| else | |
| $user = wp_get_current_user(); | |
| if ( empty( $user ) ) | |
| return false; | |
| return in_array( $role, (array) $user->roles ); | |
| } |
OlderNewer