Created
January 6, 2013 10:55
-
-
Save tomharrigan/4466547 to your computer and use it in GitHub Desktop.
Get meta data excerpts if available, otherwise use get_the_excerpt().
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
| if($instance['post_type'] == 'features'){ | |
| $exc = get_post_meta( get_the_ID(), 'feature_excerpt', true ); | |
| if ( $exc != '' ) { | |
| $exc = stripslashes( $exc ); | |
| } else { | |
| $exc = strip_tags( get_the_excerpt() ); | |
| } | |
| } else if($instance['post_type'] == 'feedback'){ | |
| $exc = get_post_meta( get_the_ID(), 'feedback_excerpt', true ); | |
| if ( $exc != '' ) { | |
| $exc = stripslashes( $exc ); | |
| } else { | |
| $exc = strip_tags( get_the_excerpt() ); | |
| } | |
| } else { | |
| $exc = strip_tags( get_the_excerpt() ); | |
| } | |
| $html .= '<div class="widget-slider-excerpt">' . $exc . '</div>' . "\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment