Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'get_the_excerpt', 'mhsales_get_community_excerpt', 999 );
- function mhsales_get_community_excerpt( $excerpt ) {
- if ( is_admin() ) {
- return $excerpt;
- }
- // check to make sure we are on the community archive
- if ( is_post_type_archive( 'community' ) ) {
- // get the content from the shortcode
- $excerpt = do_shortcode('[pods name="community" template="Community Excerpt for Archive Display" id="'.get_the_ID().'"]');
- }
- return $excerpt;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement