add_theme_support('custom-fieldss');
add_theme_support('post-thumbnails');
set_post_thumbnail_size(120, 100, true);
+add_post_type_support("page", 'excerpt');
/**
* glm_site_scripts
*
/* Header for posts*/
function glm_get_header() {
echo '<div';
-
- if (has_post_thumbnail()) {
+ if ( has_post_thumbnail() && is_page( array( 180,182,184,186,187,179 ) ) ) {
$image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
echo ' style="background-image: url('.$image_data[0].');height:0;padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 350px; "';
} else {
<?php $community_page_object = get_page( 254 ); ?>
<?php $community_page_image = wp_get_attachment_image_src( get_post_thumbnail_id( 254 ), 'map-image'); ?>
<?php $community_page_url = get_permalink( 254 ); ?>
- <?php $community_page_content = substr(strip_tags($community_page_object->post_content),0, 300) . "..."; ?>
- <?php $community_page_content = json_encode(strip_shortcodes($community_page_content)); ?>
+ <?php //$community_page_content = substr(strip_tags($community_page_object->post_content),0, 300) . "..."; ?>
+ <?php //$community_page_content = json_encode(strip_shortcodes($community_page_content)); ?>
+ <?php $community_page_content = json_encode( get_the_excerpt( 254 ) ); ?>
<div class="map-page-title-container"><a class="map-page-link map-title-link" href="<?php echo $community_page_url ;?>"></a></div>
// set the default data next to the dropdown community map
function set_default_data(){
-
regionData.find(page_title).html('<?php echo $community_page_object->post_title; ?>');
regionData.find(image_container).css("height","125px").css("width", "125px").css("background", "url(' <?php echo $community_page_image[0]; ?> ')no-repeat center center").css("background-size", "cover");
regionData.find(page_content).html(default_content);
image_container.css("display", "none");
}
- regionData.find(page_content).html(site_array[id]['content'] + "...");
+ regionData.find(page_content).html(site_array[id]['excerpt'] + "...");
regionData.find(more_link).attr("href", site_array[id]['url']);
}, function () {
$(region).on("click", function (){
window.location.href = site_array[id]['url'];
- console.log("test");
});
$(".map-text").on("click", function(){
id = $(this).attr("data-id");
window.location.href = site_array[id]['url'];
});
-
});
</script>
\ No newline at end of file