From: Anthony Talarico Date: Tue, 30 Aug 2016 20:14:00 +0000 (-0400) Subject: adding elipses to the end of the 'excerpts' for the community map dropdown page content X-Git-Tag: v1.0.0^2~55 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=c1eb4ed19b7f12cc49e1cc72806866545b2c3c64;p=WP-Themes%2Fpetoskeyarea.git adding elipses to the end of the 'excerpts' for the community map dropdown page content --- diff --git a/parts/community-map.php b/parts/community-map.php index ea506e3..3e9f72c 100644 --- a/parts/community-map.php +++ b/parts/community-map.php @@ -10,10 +10,10 @@ - - post_content),0, 300) ; ?> + + post_content),0, 300) . "..."; ?> - +

MORE
@@ -59,6 +59,14 @@ foreach ($nav_posts as $p){ $sites[$p->ID]['url'] = get_permalink($p->ID); $sites[$p->ID]['title'] = get_the_title($p->ID); $sites[$p->ID]['image'] = wp_get_attachment_url( get_post_thumbnail_id($p->ID)); + + // $content = strip_tags($page_object->post_content); + // $filter_content = mb_substr($content, 0, strpos($content, ' ', 260)); + // $filter_content = json_encode(strip_shortcodes($filter_content)); + // $filter_content = trim(preg_replace('/\s+/', ' ',$filter_content); + + + $filter_content = substr(strip_tags($page_object->post_content),0, 300); $filter_content = strip_shortcodes($filter_content); $sites[$p->ID]['content'] = $filter_content; @@ -135,7 +143,6 @@ foreach ($nav_posts as $p){ $(region).on("click", function (){ window.location.href = site_array[id]['url']; - }); });