Created
August 17, 2016 17:54
-
-
Save morganisok/c7b21c764e53d70a62ac17df5cec8f98 to your computer and use it in GitHub Desktop.
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
| add_filter( 'the_content', 'fireresource_show_available_employees' ); | |
| function fireresource_show_available_employees( $content ) { | |
| if( is_singular( 'shift' ) && is_main_query() && !is_admin() ) { | |
| $available_employees = get_post_meta( get_the_id(), '_wpaesm_shiftnotes', true ); | |
| if( $available_employees ) { | |
| $new_content = '<p><strong>Available Employees:</strong>' . $available_employees . '</p>'; | |
| } | |
| $content = $new_content . $content; | |
| } | |
| return $content; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment