qa
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
1 changed file
with
4 additions
and
2 deletions
| ... | @@ -15,16 +15,18 @@ $img = ""; | ... | @@ -15,16 +15,18 @@ $img = ""; |
| 15 | $post_type = get_post_type(get_the_ID()); | 15 | $post_type = get_post_type(get_the_ID()); |
| 16 | $permalink = get_permalink(); | 16 | $permalink = get_permalink(); |
| 17 | $target = ''; | 17 | $target = ''; |
| 18 | $excerpt = get_the_excerpt(); | ||
| 18 | if($post_type == 'attachment') { | 19 | if($post_type == 'attachment') { |
| 19 | $permalink = wp_get_attachment_url( get_the_ID()); | 20 | $permalink = wp_get_attachment_url( get_the_ID()); |
| 20 | if ( wp_attachment_is_image(get_the_ID()) ) { | 21 | if ( wp_attachment_is_image(get_the_ID()) ) { |
| 21 | $img = wp_get_attachment_url( get_the_ID()); | 22 | $img = wp_get_attachment_url( get_the_ID()); |
| 22 | } | 23 | } |
| 23 | $target = 'target="_blank"'; | 24 | $target = 'target="_blank"'; |
| 24 | 25 | $excerpt = get_post_meta ( get_the_ID(), 'description', true ); | |
| 25 | }else if($post_type == 'documents'){ | 26 | }else if($post_type == 'documents'){ |
| 26 | $permalink = get_post_meta( get_the_ID(), 'document_link', true ); | 27 | $permalink = get_post_meta( get_the_ID(), 'document_link', true ); |
| 27 | $target = 'target="_blank"'; | 28 | $target = 'target="_blank"'; |
| 29 | $excerpt = get_post_meta ( get_the_ID(), 'description', true ); | ||
| 28 | } | 30 | } |
| 29 | 31 | ||
| 30 | $term_list = array(); | 32 | $term_list = array(); |
| ... | @@ -78,7 +80,7 @@ if ( !empty( $terms ) && !is_wp_error( $terms ) ){ | ... | @@ -78,7 +80,7 @@ if ( !empty( $terms ) && !is_wp_error( $terms ) ){ |
| 78 | 80 | ||
| 79 | <div class="entry-summary" id='content'> | 81 | <div class="entry-summary" id='content'> |
| 80 | 82 | ||
| 81 | <?= str_replace("[...]Read More...", "",wp_strip_all_tags(get_the_excerpt(), true)); ?> | 83 | <?= str_replace("[...]Read More...", "",wp_strip_all_tags($excerpt, true)); ?> |
| 82 | 84 | ||
| 83 | </div><!-- .entry-summary --> | 85 | </div><!-- .entry-summary --> |
| 84 | 86 | ... | ... |
-
Please register or sign in to post a comment